diff --git a/tests/llm_translation/test_anthropic_completion.py b/tests/llm_translation/test_anthropic_completion.py index f42a424dcaa..1513b4ddb2d 100644 --- a/tests/llm_translation/test_anthropic_completion.py +++ b/tests/llm_translation/test_anthropic_completion.py @@ -365,7 +365,7 @@ def test_anthropic_tool_use(tool_type, tool_config, message_content): litellm._turn_on_debug() tools = [tool_config] - model = "claude-3-5-sonnet-20241022" + model = "claude-sonnet-4-5-20250929" messages = [{"role": "user", "content": message_content}] try: @@ -908,7 +908,7 @@ def test_anthropic_citations_api(): try: resp = completion( - model="claude-3-5-sonnet-20241022", + model="claude-sonnet-4-5-20250929", messages=[ { "role": "user", @@ -953,7 +953,7 @@ def test_anthropic_citations_api_streaming(): from litellm import completion resp = completion( - model="claude-3-5-sonnet-20241022", + model="claude-sonnet-4-5-20250929", messages=[ { "role": "user", diff --git a/tests/local_testing/test_function_calling.py b/tests/local_testing/test_function_calling.py index e7eb0ee4d66..a8172c16afd 100644 --- a/tests/local_testing/test_function_calling.py +++ b/tests/local_testing/test_function_calling.py @@ -700,7 +700,7 @@ def test_passing_tool_result_as_list(model): resp = completion(model=model, messages=messages, tools=tools) print(resp) - if model == "claude-3-5-sonnet-20241022": + if model == "claude-sonnet-4-5-20250929": assert resp.usage.prompt_tokens_details.cached_tokens > 0 diff --git a/tests/pass_through_tests/base_anthropic_messages_test.py b/tests/pass_through_tests/base_anthropic_messages_test.py index aed267ac8a1..90d00ccb1ad 100644 --- a/tests/pass_through_tests/base_anthropic_messages_test.py +++ b/tests/pass_through_tests/base_anthropic_messages_test.py @@ -17,7 +17,7 @@ class BaseAnthropicMessagesTest(ABC): print("making basic completion request to anthropic passthrough") client = self.get_client() response = client.messages.create( - model="claude-3-5-sonnet-20241022", + model="claude-sonnet-4-5-20250929", max_tokens=1024, messages=[{"role": "user", "content": "Say 'hello test' and nothing else"}], extra_body={ @@ -37,7 +37,7 @@ class BaseAnthropicMessagesTest(ABC): messages=[ {"role": "user", "content": "Say 'hello stream test' and nothing else"} ], - model="claude-3-5-sonnet-20241022", + model="claude-sonnet-4-5-20250929", extra_body={ "litellm_metadata": { "tags": ["test-tag-stream-1", "test-tag-stream-2"], @@ -110,7 +110,7 @@ class BaseAnthropicMessagesTest(ABC): try: client = self.get_client() response = client.messages.create( - model="claude-3-5-sonnet-20241022", + model="claude-sonnet-4-5-20250929", max_tokens=10, stream=True, messages=["hi"], @@ -130,7 +130,7 @@ class BaseAnthropicMessagesTest(ABC): try: client = self.get_client() response = client.messages.create( - model="claude-3-5-sonnet-20241022", + model="claude-sonnet-4-5-20250929", max_tokens=10, messages=["hi"], ) diff --git a/tests/pass_through_tests/test_anthropic_passthrough.py b/tests/pass_through_tests/test_anthropic_passthrough.py index 6e819f9971c..1a2d1b28ab5 100644 --- a/tests/pass_through_tests/test_anthropic_passthrough.py +++ b/tests/pass_through_tests/test_anthropic_passthrough.py @@ -21,7 +21,7 @@ async def test_anthropic_basic_completion_with_headers(): } payload = { - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "max_tokens": 10, "messages": [{"role": "user", "content": "Say 'hello test' and nothing else"}], "litellm_metadata": { @@ -149,7 +149,7 @@ async def test_anthropic_streaming_with_headers(): } payload = { - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "max_tokens": 10, "messages": [ {"role": "user", "content": "Say 'hello stream test' and nothing else"} diff --git a/tests/pass_through_tests/test_anthropic_passthrough_python_sdkpy b/tests/pass_through_tests/test_anthropic_passthrough_python_sdkpy index beffcbc951c..e611a2d86a6 100644 --- a/tests/pass_through_tests/test_anthropic_passthrough_python_sdkpy +++ b/tests/pass_through_tests/test_anthropic_passthrough_python_sdkpy @@ -13,7 +13,7 @@ client = anthropic.Anthropic( def test_anthropic_basic_completion(): print("making basic completion request to anthropic passthrough") response = client.messages.create( - model="claude-3-5-sonnet-20241022", + model="claude-sonnet-4-5-20250929", max_tokens=1024, messages=[{"role": "user", "content": "Say 'hello test' and nothing else"}], ) @@ -29,7 +29,7 @@ def test_anthropic_streaming(): messages=[ {"role": "user", "content": "Say 'hello stream test' and nothing else"} ], - model="claude-3-5-sonnet-20241022", + model="claude-sonnet-4-5-20250929", ) as stream: for text in stream.text_stream: collected_output.append(text) diff --git a/tests/pass_through_unit_tests/test_pass_through_unit_tests.py b/tests/pass_through_unit_tests/test_pass_through_unit_tests.py index 445d0ca55e8..0e681cb1e02 100644 --- a/tests/pass_through_unit_tests/test_pass_through_unit_tests.py +++ b/tests/pass_through_unit_tests/test_pass_through_unit_tests.py @@ -234,7 +234,7 @@ def test_init_kwargs_with_tags_in_header(mock_request, mock_user_api_key_dict): athropic_request_body = { - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "max_tokens": 256, "messages": [{"role": "user", "content": "Hello, world tell me 2 sentences "}], "litellm_metadata": {"tags": ["hi", "hello"]}, diff --git a/tests/pass_through_unit_tests/test_unit_test_anthropic_pass_through.py b/tests/pass_through_unit_tests/test_unit_test_anthropic_pass_through.py index bcd93de0bba..581f1d19793 100644 --- a/tests/pass_through_unit_tests/test_unit_test_anthropic_pass_through.py +++ b/tests/pass_through_unit_tests/test_unit_test_anthropic_pass_through.py @@ -35,7 +35,7 @@ def mock_httpx_response(): mock_resp.json.return_value = { "content": [{"text": "Hi! My name is Claude.", "type": "text"}], "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "role": "assistant", "stop_reason": "end_turn", "stop_sequence": None, @@ -164,14 +164,14 @@ def test_create_anthropic_response_logging_payload(mock_logging_obj, metadata_pa {"type": "bash_20241022", "name": "bash"}, ], "max_tokens": 4096, - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", **metadata_params, }, "response_body": { "id": "msg_015uSaCZBvu9gUSkAmZtMfxC", "type": "message", "role": "assistant", - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "content": [ { "type": "text", @@ -190,7 +190,7 @@ def test_create_anthropic_response_logging_payload(mock_logging_obj, metadata_pa }, }, "response_cost": 0.007941, - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", }, start_time=start_time, end_time=end_time, @@ -219,7 +219,7 @@ def test_get_user_from_metadata(end_user_id): "id": "msg_015uSaCZBvu9gUSkAmZtMfxC", "type": "message", "role": "assistant", - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "content": [ { "type": "text", diff --git a/tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py b/tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py index deb442e8075..b556b0e5bee 100644 --- a/tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py +++ b/tests/test_litellm/llms/anthropic/chat/test_anthropic_chat_transformation.py @@ -138,7 +138,7 @@ def test_extract_response_content_with_citations(): "id": "msg_01XrAv7gc5tQNDuoADra7vB4", "type": "message", "role": "assistant", - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "content": [ {"type": "text", "text": "According to the documents, "}, { @@ -326,7 +326,7 @@ def test_transform_response_with_prefix_prompt(): "id": "msg_01XrAv7gc5tQNDuoADra7vB4", "type": "message", "role": "assistant", - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "content": [{"type": "text", "text": " The grass is green."}], "stop_reason": "end_turn", "stop_sequence": None, diff --git a/tests/test_litellm/passthrough/test_passthrough_main.py b/tests/test_litellm/passthrough/test_passthrough_main.py index 2f577b17a05..faa59969658 100644 --- a/tests/test_litellm/passthrough/test_passthrough_main.py +++ b/tests/test_litellm/passthrough/test_passthrough_main.py @@ -258,7 +258,7 @@ async def test_pass_through_request_stream_param_override( # Create request body with stream=True request_body = { - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "max_tokens": 256, "messages": [{"role": "user", "content": "Hello, world"}], "stream": True, # This should override the function parameter @@ -355,7 +355,7 @@ async def test_pass_through_request_stream_param_no_override( # Create request body without stream parameter request_body = { - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "max_tokens": 256, "messages": [{"role": "user", "content": "Hello, world"}], # No stream parameter - should use function parameter stream=False diff --git a/tests/test_litellm/responses/litellm_completion_transformation/test_session_handler.py b/tests/test_litellm/responses/litellm_completion_transformation/test_session_handler.py index e67d6373dd4..bd6bab9d61e 100644 --- a/tests/test_litellm/responses/litellm_completion_transformation/test_session_handler.py +++ b/tests/test_litellm/responses/litellm_completion_transformation/test_session_handler.py @@ -42,7 +42,7 @@ async def test_get_chat_completion_message_history_for_previous_response_id(): }, "response": { "id": "chatcmpl-935b8dad-fdc2-466e-a8ca-e26e5a8a21bb", - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "object": "chat.completion", "choices": [ { @@ -84,7 +84,7 @@ async def test_get_chat_completion_message_history_for_previous_response_id(): }, "response": { "id": "chatcmpl-370760c9-39fa-4db7-b034-d1f8d933c935", - "model": "claude-3-5-sonnet-20241022", + "model": "claude-sonnet-4-5-20250929", "object": "chat.completion", "choices": [ { diff --git a/ui/litellm-dashboard/out/404.html b/ui/litellm-dashboard/out/404.html index 8e21c88b9a3..abde756ab87 100644 --- a/ui/litellm-dashboard/out/404.html +++ b/ui/litellm-dashboard/out/404.html @@ -1 +1 @@ -404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/131-e4210f33d0c47644.js b/ui/litellm-dashboard/out/_next/static/chunks/131-66e1fb73fd8f2361.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/131-e4210f33d0c47644.js rename to ui/litellm-dashboard/out/_next/static/chunks/131-66e1fb73fd8f2361.js index 2b866db7eaf..9d754560575 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/131-e4210f33d0c47644.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/131-66e1fb73fd8f2361.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[131],{95704:function(e,t,a){a.d(t,{Dx:function(){return u.Z},RM:function(){return l.Z},SC:function(){return c.Z},Zb:function(){return s.Z},iA:function(){return r.Z},pj:function(){return n.Z},ss:function(){return i.Z},xs:function(){return o.Z},xv:function(){return d.Z}});var s=a(12514),r=a(21626),l=a(97214),n=a(28241),i=a(58834),o=a(69552),c=a(71876),d=a(84264),u=a(96761)},92280:function(e,t,a){a.d(t,{x:function(){return s.Z}});var s=a(84264)},56522:function(e,t,a){a.d(t,{o:function(){return r.Z},x:function(){return s.Z}});var s=a(84264),r=a(49566)},39760:function(e,t,a){var s=a(2265),r=a(99376),l=a(14474),n=a(3914);t.Z=()=>{var e,t,a,i,o,c,d;let u=(0,r.useRouter)(),m="undefined"!=typeof document?(0,n.e)("token"):null;(0,s.useEffect)(()=>{m||u.replace("/sso/key/generate")},[m,u]);let g=(0,s.useMemo)(()=>{if(!m)return null;try{return(0,l.o)(m)}catch(e){return(0,n.b)(),u.replace("/sso/key/generate"),null}},[m,u]);return{token:m,accessToken:null!==(e=null==g?void 0:g.key)&&void 0!==e?e:null,userId:null!==(t=null==g?void 0:g.user_id)&&void 0!==t?t:null,userEmail:null!==(a=null==g?void 0:g.user_email)&&void 0!==a?a:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(i=null==g?void 0:g.user_role)&&void 0!==i?i:null),premiumUser:null!==(o=null==g?void 0:g.premium_user)&&void 0!==o?o:null,disabledPersonalKeyCreation:null!==(c=null==g?void 0:g.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==g?void 0:g.login_method)==="username_password"}}},97434:function(e,t,a){a.d(t,{Dg:function(){return l},Lo:function(){return n},O0:function(){return r},PA:function(){return c},RD:function(){return i},Z3:function(){return o},_3:function(){return d}});let s="/ui/assets/logos/",r=[{id:"arize",displayName:"Arize",logo:"".concat(s,"arize.png"),supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_key:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:"".concat(s,"braintrust.png"),supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",logo:"".concat(s,"custom.svg"),supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:"".concat(s,"datadog.png"),supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:"".concat(s,"lago.svg"),supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:"".concat(s,"langfuse.png"),supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:"".concat(s,"langfuse.png"),supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:"".concat(s,"langsmith.png"),supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:"".concat(s,"openmeter.png"),supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:"".concat(s,"otel.png"),supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:"".concat(s,"aws.svg"),supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"}],l=r.reduce((e,t)=>(e[t.displayName]=t,e),{}),n=r.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),i=r.reduce((e,t)=>(e[t.id]=t.displayName,e),{}),o=e=>e.map(e=>n[e]||e),c=e=>e.map(e=>i[e]||e),d=e=>r.find(t=>t.id===e)},51601:function(e,t,a){a.d(t,{p:function(){return r}});var s=a(19250);let r=async e=>{try{let t=await (0,s.modelHubCall)(e);if(console.log("model_info:",t),(null==t?void 0:t.data.length)>0){let e=t.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}},95096:function(e,t,a){var s=a(57437),r=a(2265),l=a(52787),n=a(19250);t.Z=e=>{let{onChange:t,value:a,className:i,accessToken:o,placeholder:c="Select pass through routes",disabled:d=!1,teamId:u}=e,[m,g]=(0,r.useState)([]),[p,x]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){x(!0);try{let e=await (0,n.getPassThroughEndpointsCall)(o,u);if(e.endpoints){let t=e.endpoints.map(e=>e.path);g(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{x(!1)}}})()},[o,u]),(0,s.jsx)(l.default,{mode:"tags",placeholder:c,onChange:t,value:a,loading:p,className:i,options:m.map(e=>({label:e,value:e})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}},46468:function(e,t,a){a.d(t,{K2:function(){return r},Ob:function(){return n},W0:function(){return l}});var s=a(19250);let r=async(e,t,a)=>{try{if(null===e||null===t)return;if(null!==a){let r=(await (0,s.modelAvailableCall)(a,e,t,!0,null,!0)).data.map(e=>e.id),l=[],n=[];return r.forEach(e=>{e.endsWith("/*")?l.push(e):n.push(e)}),[...l,...n]}}catch(e){console.error("Error fetching user models:",e)}},l=e=>{if(e.endsWith("/*")){let t=e.replace("/*","");return"All ".concat(t," models")}return e},n=(e,t)=>{let a=[],s=[];return console.log("teamModels",e),console.log("allModels",t),e.forEach(e=>{if(e.endsWith("/*")){let r=e.replace("/*",""),l=t.filter(e=>e.startsWith(r+"/"));s.push(...l),a.push(e)}else s.push(e)}),[...a,...s].filter((e,t,a)=>a.indexOf(e)===t)}},95920:function(e,t,a){var s=a(57437),r=a(2265),l=a(52787),n=a(19250);t.Z=e=>{let{onChange:t,value:a,className:i,accessToken:o,placeholder:c="Select MCP servers",disabled:d=!1}=e,[u,m]=(0,r.useState)([]),[g,p]=(0,r.useState)([]),[x,h]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(o){h(!0);try{let[e,t]=await Promise.all([(0,n.fetchMCPServers)(o),(0,n.fetchMCPAccessGroups)(o)]),a=Array.isArray(e)?e:e.data||[],s=Array.isArray(t)?t:t.data||[];m(a),p(s)}catch(e){console.error("Error fetching MCP servers or access groups:",e)}finally{h(!1)}}})()},[o]);let f=[...g.map(e=>({label:e,value:e,isAccessGroup:!0,searchText:"".concat(e," Access Group")})),...u.map(e=>({label:"".concat(e.server_name||e.server_id," (").concat(e.server_id,")"),value:e.server_id,isAccessGroup:!1,searchText:"".concat(e.server_name||e.server_id," ").concat(e.server_id," MCP Server")}))],v=[...(null==a?void 0:a.servers)||[],...(null==a?void 0:a.accessGroups)||[]];return(0,s.jsx)("div",{children:(0,s.jsx)(l.default,{mode:"multiple",placeholder:c,onChange:e=>{t({servers:e.filter(e=>!g.includes(e)),accessGroups:e.filter(e=>g.includes(e))})},value:v,loading:x,className:i,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>{var a;return((null===(a=f.find(e=>e.value===(null==t?void 0:t.value)))||void 0===a?void 0:a.searchText)||"").toLowerCase().includes(e.toLowerCase())},children:f.map(e=>(0,s.jsx)(l.default.Option,{value:e.value,label:e.label,children:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,s.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#1890ff",flexShrink:0}}),(0,s.jsx)("span",{style:{flex:1},children:e.label}),(0,s.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#1890ff",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"MCP Server"})]})},e.value))})})}},68473:function(e,t,a){var s=a(57437),r=a(2265),l=a(19250),n=a(92280),i=a(87908),o=a(61994),c=a(32489);t.Z=e=>{let{accessToken:t,selectedServers:a,toolPermissions:d,onChange:u,disabled:m=!1}=e,[g,p]=(0,r.useState)([]),[x,h]=(0,r.useState)({}),[f,v]=(0,r.useState)({}),[_,y]=(0,r.useState)({});(0,r.useEffect)(()=>{(async()=>{if(0===a.length){p([]);return}try{let e=await (0,l.fetchMCPServers)(t),s=(Array.isArray(e)?e:e.data||[]).filter(e=>a.includes(e.server_id));p(s)}catch(e){console.error("Error fetching MCP servers:",e),p([])}})()},[a,t]);let b=async e=>{v(t=>({...t,[e]:!0})),y(t=>({...t,[e]:""}));try{let a=await (0,l.listMCPTools)(t,e);a.error?(y(t=>({...t,[e]:a.message||"Failed to fetch tools"})),h(t=>({...t,[e]:[]}))):h(t=>({...t,[e]:a.tools||[]}))}catch(t){console.error("Error fetching tools for server ".concat(e,":"),t),y(t=>({...t,[e]:"Failed to fetch tools"})),h(t=>({...t,[e]:[]}))}finally{v(t=>({...t,[e]:!1}))}};(0,r.useEffect)(()=>{g.forEach(e=>{x[e.server_id]||f[e.server_id]||b(e.server_id)})},[g]);let j=(e,t)=>{let a=d[e]||[],s=a.includes(t)?a.filter(e=>e!==t):[...a,t];u({...d,[e]:s})},N=e=>{let t=x[e]||[];u({...d,[e]:t.map(e=>e.name)})},w=e=>{u({...d,[e]:[]})};return 0===a.length?null:(0,s.jsx)("div",{className:"space-y-4",children:g.map(e=>{let t=e.server_name||e.alias||e.server_id,a=x[e.server_id]||[],r=d[e.server_id]||[],l=f[e.server_id],u=_[e.server_id];return(0,s.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.x,{className:"font-semibold text-gray-900",children:t}),e.description&&(0,s.jsx)(n.x,{className:"text-sm text-gray-500",children:e.description})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("button",{className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>N(e.server_id),disabled:m||l,children:"Select All"}),(0,s.jsx)("button",{className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>w(e.server_id),disabled:m||l,children:"Deselect All"}),(0,s.jsx)("button",{className:"text-gray-400 hover:text-gray-600",onClick:()=>{},children:(0,s.jsx)(c.Z,{className:"w-4 h-4"})})]})]}),(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(n.x,{className:"text-sm font-medium text-gray-700 mb-3",children:"Available Tools"}),l&&(0,s.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,s.jsx)(i.Z,{size:"large"}),(0,s.jsx)(n.x,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),u&&!l&&(0,s.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,s.jsx)(n.x,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,s.jsx)(n.x,{className:"text-sm text-red-500 mt-1",children:u})]}),!l&&!u&&a.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:a.map(t=>{let a=r.includes(t.name);return(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)(o.Z,{checked:a,onChange:()=>j(e.server_id,t.name),disabled:m}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(n.x,{className:"font-medium text-gray-900",children:t.name}),(0,s.jsxs)(n.x,{className:"text-sm text-gray-500",children:["- ",t.description||"No description"]})]})})]},t.name)})}),!l&&!u&&0===a.length&&(0,s.jsx)("div",{className:"text-center py-6",children:(0,s.jsx)(n.x,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}},24199:function(e,t,a){a.d(t,{Z:function(){return l}});var s=a(57437);a(2265);var r=a(30150),l=e=>{let{step:t=.01,style:a={width:"100%"},placeholder:l="Enter a numerical value",min:n,max:i,onChange:o,...c}=e;return(0,s.jsx)(r.Z,{onWheel:e=>e.currentTarget.blur(),step:t,style:a,placeholder:l,min:n,max:i,onChange:o,...c})}},54507:function(e,t,a){a.d(t,{Z:function(){return v}});var s=a(57437);a(2265);var r=a(52787),l=a(89970),n=a(23496),i=a(15424),o=a(20831),c=a(12514),d=a(49566),u=a(91777),m=a(82182),g=a(22452),p=a(74998),x=a(97434),h=a(24199);let{Option:f}=r.default;var v=e=>{let{value:t=[],onChange:a,disabledCallbacks:v=[],onDisabledCallbacksChange:_}=e,y=Object.entries(x.Dg).filter(e=>{let[t,a]=e;return a.supports_key_team_logging}).map(e=>{let[t,a]=e;return t}),b=Object.keys(x.Dg),j=e=>{null==a||a(e)},N=e=>{j(t.filter((t,a)=>a!==e))},w=(e,a,s)=>{let r=[...t];if("callback_name"===a){let t=x.Lo[s]||s;r[e]={...r[e],[a]:t,callback_vars:{}}}else r[e]={...r[e],[a]:s};j(r)},k=(e,a,s)=>{let r=[...t];r[e]={...r[e],callback_vars:{...r[e].callback_vars,[a]:s}},j(r)},C=(e,t)=>{var a,r;if(!e.callback_name)return null;let n=null===(a=Object.entries(x.Lo).find(t=>{let[a,s]=t;return s===e.callback_name}))||void 0===a?void 0:a[0];if(!n)return null;let o=(null===(r=x.Dg[n])||void 0===r?void 0:r.dynamic_params)||{};return 0===Object.keys(o).length?null:(0,s.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,s.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,s.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(o).map(a=>{let[r,n]=a;return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,s.jsx)("span",{children:r.replace(/_/g," ")}),(0,s.jsx)(l.Z,{title:"Environment variable reference recommended: os.environ/".concat(r.toUpperCase()),children:(0,s.jsx)(i.Z,{className:"text-gray-400 cursor-help text-xs"})}),"password"===n&&(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===n&&(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===n&&(0,s.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===n?(0,s.jsx)(h.Z,{step:.01,width:400,placeholder:"os.environ/".concat(r.toUpperCase()),value:e.callback_vars[r]||"",onChange:e=>k(t,r,e.target.value)}):(0,s.jsx)(d.Z,{type:"password"===n?"password":"text",placeholder:"os.environ/".concat(r.toUpperCase()),value:e.callback_vars[r]||"",onChange:e=>k(t,r,e.target.value)})]},r)})})]})};return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(u.Z,{className:"w-5 h-5 text-red-500"}),(0,s.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,s.jsx)(l.Z,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,s.jsx)(i.Z,{className:"text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,s.jsx)(r.default,{mode:"multiple",placeholder:"Select callbacks to disable",value:v,onChange:e=>{let t=(0,x.Z3)(e);null==_||_(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{var t,a;let r=null===(t=x.Dg[e])||void 0===t?void 0:t.logo,n=null===(a=x.Dg[e])||void 0===a?void 0:a.description;return(0,s.jsx)(f,{value:e,label:e,children:(0,s.jsx)(l.Z,{title:n,placement:"right",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,s.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(0,s.jsx)("span",{children:e})]})})},e)})}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,s.jsx)(n.Z,{}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(m.Z,{className:"w-5 h-5 text-blue-500"}),(0,s.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,s.jsx)(l.Z,{title:"Configure callback logging integrations for this team.",children:(0,s.jsx)(i.Z,{className:"text-gray-400 cursor-help"})})]}),(0,s.jsx)(o.Z,{variant:"secondary",onClick:()=>{j([...t,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:g.Z,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,s.jsx)("div",{className:"space-y-4",children:t.map((e,t)=>{var a,n;let i=e.callback_name?null===(a=Object.entries(x.Lo).find(t=>{let[a,s]=t;return s===e.callback_name}))||void 0===a?void 0:a[0]:void 0,d=i?null===(n=x.Dg[i])||void 0===n?void 0:n.logo:null;return(0,s.jsxs)(c.Z,{className:"border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,s.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,s.jsx)("img",{src:d,alt:i,className:"w-5 h-5 object-contain"}),(0,s.jsxs)("span",{className:"text-sm font-medium",children:[i||"New Integration"," Configuration"]})]}),(0,s.jsx)(o.Z,{variant:"light",onClick:()=>N(t),icon:p.Z,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,s.jsx)(r.default,{value:i,placeholder:"Select integration",onChange:e=>w(t,"callback_name",e),className:"w-full",optionLabelProp:"label",children:y.map(e=>{var t,a;let r=null===(t=x.Dg[e])||void 0===t?void 0:t.logo,n=null===(a=x.Dg[e])||void 0===a?void 0:a.description;return(0,s.jsx)(f,{value:e,label:e,children:(0,s.jsx)(l.Z,{title:n,placement:"right",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,s.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(0,s.jsx)("span",{children:e})]})})},e)})})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,s.jsxs)(r.default,{value:e.callback_type,onChange:e=>w(t,"callback_type",e),className:"w-full",children:[(0,s.jsx)(f,{value:"success",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,s.jsx)("span",{children:"Success Only"})]})}),(0,s.jsx)(f,{value:"failure",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,s.jsx)("span",{children:"Failure Only"})]})}),(0,s.jsx)(f,{value:"success_and_failure",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,s.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),C(e,t)]})]},t)})}),0===t.length&&(0,s.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,s.jsx)(m.Z,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,s.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,s.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}},97415:function(e,t,a){var s=a(57437),r=a(2265),l=a(52787),n=a(19250);t.Z=e=>{let{onChange:t,value:a,className:i,accessToken:o,placeholder:c="Select vector stores",disabled:d=!1}=e,[u,m]=(0,r.useState)([]),[g,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){p(!0);try{let e=await (0,n.vectorStoreListCall)(o);e.data&&m(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[o]),(0,s.jsx)("div",{children:(0,s.jsx)(l.default,{mode:"multiple",placeholder:c,onChange:t,value:a,loading:g,className:i,options:u.map(e=>({label:"".concat(e.vector_store_name||e.vector_store_id," (").concat(e.vector_store_id,")"),value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})})}},59872:function(e,t,a){a.d(t,{nl:function(){return r},pw:function(){return l},vQ:function(){return n}});var s=a(9114);function r(e,t){let a=structuredClone(e);for(let[e,s]of Object.entries(t))e in a&&(a[e]=s);return a}let l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||!Number.isFinite(e))return"-";let s={minimumFractionDigits:t,maximumFractionDigits:t};if(!a)return e.toLocaleString("en-US",s);let r=Math.abs(e),l=r,n="";return r>=1e6?(l=r/1e6,n="M"):r>=1e3&&(l=r/1e3,n="K"),"".concat(e<0?"-":"").concat(l.toLocaleString("en-US",s)).concat(n)},n=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return i(e,t);try{return await navigator.clipboard.writeText(e),s.Z.success(t),!0}catch(a){return console.error("Clipboard API failed: ",a),i(e,t)}},i=(e,t)=>{try{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",a.setAttribute("readonly",""),document.body.appendChild(a),a.focus(),a.select();let r=document.execCommand("copy");if(document.body.removeChild(a),r)return s.Z.success(t),!0;throw Error("execCommand failed")}catch(e){return s.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}}},20347:function(e,t,a){a.d(t,{LQ:function(){return l},ZL:function(){return s},lo:function(){return r},tY:function(){return n}});let s=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],r=["Internal User","Internal Viewer"],l=["Internal User","Admin","proxy_admin"],n=e=>s.includes(e)}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[131],{95704:function(e,t,a){a.d(t,{Dx:function(){return u.Z},RM:function(){return l.Z},SC:function(){return c.Z},Zb:function(){return s.Z},iA:function(){return r.Z},pj:function(){return n.Z},ss:function(){return i.Z},xs:function(){return o.Z},xv:function(){return d.Z}});var s=a(12514),r=a(21626),l=a(97214),n=a(28241),i=a(58834),o=a(69552),c=a(71876),d=a(84264),u=a(96761)},92280:function(e,t,a){a.d(t,{x:function(){return s.Z}});var s=a(84264)},56522:function(e,t,a){a.d(t,{o:function(){return r.Z},x:function(){return s.Z}});var s=a(84264),r=a(49566)},80443:function(e,t,a){var s=a(2265),r=a(99376),l=a(14474),n=a(3914);t.Z=()=>{var e,t,a,i,o,c,d;let u=(0,r.useRouter)(),m="undefined"!=typeof document?(0,n.e)("token"):null;(0,s.useEffect)(()=>{m||u.replace("/sso/key/generate")},[m,u]);let g=(0,s.useMemo)(()=>{if(!m)return null;try{return(0,l.o)(m)}catch(e){return(0,n.b)(),u.replace("/sso/key/generate"),null}},[m,u]);return{token:m,accessToken:null!==(e=null==g?void 0:g.key)&&void 0!==e?e:null,userId:null!==(t=null==g?void 0:g.user_id)&&void 0!==t?t:null,userEmail:null!==(a=null==g?void 0:g.user_email)&&void 0!==a?a:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(i=null==g?void 0:g.user_role)&&void 0!==i?i:null),premiumUser:null!==(o=null==g?void 0:g.premium_user)&&void 0!==o?o:null,disabledPersonalKeyCreation:null!==(c=null==g?void 0:g.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==g?void 0:g.login_method)==="username_password"}}},97434:function(e,t,a){a.d(t,{Dg:function(){return l},Lo:function(){return n},O0:function(){return r},PA:function(){return c},RD:function(){return i},Z3:function(){return o},_3:function(){return d}});let s="/ui/assets/logos/",r=[{id:"arize",displayName:"Arize",logo:"".concat(s,"arize.png"),supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_key:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:"".concat(s,"braintrust.png"),supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",logo:"".concat(s,"custom.svg"),supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:"".concat(s,"datadog.png"),supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:"".concat(s,"lago.svg"),supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:"".concat(s,"langfuse.png"),supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:"".concat(s,"langfuse.png"),supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:"".concat(s,"langsmith.png"),supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:"".concat(s,"openmeter.png"),supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:"".concat(s,"otel.png"),supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:"".concat(s,"aws.svg"),supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"}],l=r.reduce((e,t)=>(e[t.displayName]=t,e),{}),n=r.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),i=r.reduce((e,t)=>(e[t.id]=t.displayName,e),{}),o=e=>e.map(e=>n[e]||e),c=e=>e.map(e=>i[e]||e),d=e=>r.find(t=>t.id===e)},51601:function(e,t,a){a.d(t,{p:function(){return r}});var s=a(19250);let r=async e=>{try{let t=await (0,s.modelHubCall)(e);if(console.log("model_info:",t),(null==t?void 0:t.data.length)>0){let e=t.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}},95096:function(e,t,a){var s=a(57437),r=a(2265),l=a(52787),n=a(19250);t.Z=e=>{let{onChange:t,value:a,className:i,accessToken:o,placeholder:c="Select pass through routes",disabled:d=!1,teamId:u}=e,[m,g]=(0,r.useState)([]),[p,x]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){x(!0);try{let e=await (0,n.getPassThroughEndpointsCall)(o,u);if(e.endpoints){let t=e.endpoints.map(e=>e.path);g(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{x(!1)}}})()},[o,u]),(0,s.jsx)(l.default,{mode:"tags",placeholder:c,onChange:t,value:a,loading:p,className:i,options:m.map(e=>({label:e,value:e})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}},46468:function(e,t,a){a.d(t,{K2:function(){return r},Ob:function(){return n},W0:function(){return l}});var s=a(19250);let r=async(e,t,a)=>{try{if(null===e||null===t)return;if(null!==a){let r=(await (0,s.modelAvailableCall)(a,e,t,!0,null,!0)).data.map(e=>e.id),l=[],n=[];return r.forEach(e=>{e.endsWith("/*")?l.push(e):n.push(e)}),[...l,...n]}}catch(e){console.error("Error fetching user models:",e)}},l=e=>{if(e.endsWith("/*")){let t=e.replace("/*","");return"All ".concat(t," models")}return e},n=(e,t)=>{let a=[],s=[];return console.log("teamModels",e),console.log("allModels",t),e.forEach(e=>{if(e.endsWith("/*")){let r=e.replace("/*",""),l=t.filter(e=>e.startsWith(r+"/"));s.push(...l),a.push(e)}else s.push(e)}),[...a,...s].filter((e,t,a)=>a.indexOf(e)===t)}},95920:function(e,t,a){var s=a(57437),r=a(2265),l=a(52787),n=a(19250);t.Z=e=>{let{onChange:t,value:a,className:i,accessToken:o,placeholder:c="Select MCP servers",disabled:d=!1}=e,[u,m]=(0,r.useState)([]),[g,p]=(0,r.useState)([]),[x,h]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{if(o){h(!0);try{let[e,t]=await Promise.all([(0,n.fetchMCPServers)(o),(0,n.fetchMCPAccessGroups)(o)]),a=Array.isArray(e)?e:e.data||[],s=Array.isArray(t)?t:t.data||[];m(a),p(s)}catch(e){console.error("Error fetching MCP servers or access groups:",e)}finally{h(!1)}}})()},[o]);let f=[...g.map(e=>({label:e,value:e,isAccessGroup:!0,searchText:"".concat(e," Access Group")})),...u.map(e=>({label:"".concat(e.server_name||e.server_id," (").concat(e.server_id,")"),value:e.server_id,isAccessGroup:!1,searchText:"".concat(e.server_name||e.server_id," ").concat(e.server_id," MCP Server")}))],v=[...(null==a?void 0:a.servers)||[],...(null==a?void 0:a.accessGroups)||[]];return(0,s.jsx)("div",{children:(0,s.jsx)(l.default,{mode:"multiple",placeholder:c,onChange:e=>{t({servers:e.filter(e=>!g.includes(e)),accessGroups:e.filter(e=>g.includes(e))})},value:v,loading:x,className:i,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>{var a;return((null===(a=f.find(e=>e.value===(null==t?void 0:t.value)))||void 0===a?void 0:a.searchText)||"").toLowerCase().includes(e.toLowerCase())},children:f.map(e=>(0,s.jsx)(l.default.Option,{value:e.value,label:e.label,children:(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,s.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#1890ff",flexShrink:0}}),(0,s.jsx)("span",{style:{flex:1},children:e.label}),(0,s.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#1890ff",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"MCP Server"})]})},e.value))})})}},68473:function(e,t,a){var s=a(57437),r=a(2265),l=a(19250),n=a(92280),i=a(87908),o=a(61994),c=a(32489);t.Z=e=>{let{accessToken:t,selectedServers:a,toolPermissions:d,onChange:u,disabled:m=!1}=e,[g,p]=(0,r.useState)([]),[x,h]=(0,r.useState)({}),[f,v]=(0,r.useState)({}),[_,y]=(0,r.useState)({});(0,r.useEffect)(()=>{(async()=>{if(0===a.length){p([]);return}try{let e=await (0,l.fetchMCPServers)(t),s=(Array.isArray(e)?e:e.data||[]).filter(e=>a.includes(e.server_id));p(s)}catch(e){console.error("Error fetching MCP servers:",e),p([])}})()},[a,t]);let b=async e=>{v(t=>({...t,[e]:!0})),y(t=>({...t,[e]:""}));try{let a=await (0,l.listMCPTools)(t,e);a.error?(y(t=>({...t,[e]:a.message||"Failed to fetch tools"})),h(t=>({...t,[e]:[]}))):h(t=>({...t,[e]:a.tools||[]}))}catch(t){console.error("Error fetching tools for server ".concat(e,":"),t),y(t=>({...t,[e]:"Failed to fetch tools"})),h(t=>({...t,[e]:[]}))}finally{v(t=>({...t,[e]:!1}))}};(0,r.useEffect)(()=>{g.forEach(e=>{x[e.server_id]||f[e.server_id]||b(e.server_id)})},[g]);let j=(e,t)=>{let a=d[e]||[],s=a.includes(t)?a.filter(e=>e!==t):[...a,t];u({...d,[e]:s})},N=e=>{let t=x[e]||[];u({...d,[e]:t.map(e=>e.name)})},w=e=>{u({...d,[e]:[]})};return 0===a.length?null:(0,s.jsx)("div",{className:"space-y-4",children:g.map(e=>{let t=e.server_name||e.alias||e.server_id,a=x[e.server_id]||[],r=d[e.server_id]||[],l=f[e.server_id],u=_[e.server_id];return(0,s.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.x,{className:"font-semibold text-gray-900",children:t}),e.description&&(0,s.jsx)(n.x,{className:"text-sm text-gray-500",children:e.description})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("button",{className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>N(e.server_id),disabled:m||l,children:"Select All"}),(0,s.jsx)("button",{className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>w(e.server_id),disabled:m||l,children:"Deselect All"}),(0,s.jsx)("button",{className:"text-gray-400 hover:text-gray-600",onClick:()=>{},children:(0,s.jsx)(c.Z,{className:"w-4 h-4"})})]})]}),(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(n.x,{className:"text-sm font-medium text-gray-700 mb-3",children:"Available Tools"}),l&&(0,s.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,s.jsx)(i.Z,{size:"large"}),(0,s.jsx)(n.x,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),u&&!l&&(0,s.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,s.jsx)(n.x,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,s.jsx)(n.x,{className:"text-sm text-red-500 mt-1",children:u})]}),!l&&!u&&a.length>0&&(0,s.jsx)("div",{className:"space-y-2",children:a.map(t=>{let a=r.includes(t.name);return(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)(o.Z,{checked:a,onChange:()=>j(e.server_id,t.name),disabled:m}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(n.x,{className:"font-medium text-gray-900",children:t.name}),(0,s.jsxs)(n.x,{className:"text-sm text-gray-500",children:["- ",t.description||"No description"]})]})})]},t.name)})}),!l&&!u&&0===a.length&&(0,s.jsx)("div",{className:"text-center py-6",children:(0,s.jsx)(n.x,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}},24199:function(e,t,a){a.d(t,{Z:function(){return l}});var s=a(57437);a(2265);var r=a(30150),l=e=>{let{step:t=.01,style:a={width:"100%"},placeholder:l="Enter a numerical value",min:n,max:i,onChange:o,...c}=e;return(0,s.jsx)(r.Z,{onWheel:e=>e.currentTarget.blur(),step:t,style:a,placeholder:l,min:n,max:i,onChange:o,...c})}},54507:function(e,t,a){a.d(t,{Z:function(){return v}});var s=a(57437);a(2265);var r=a(52787),l=a(89970),n=a(23496),i=a(15424),o=a(20831),c=a(12514),d=a(49566),u=a(91777),m=a(82182),g=a(22452),p=a(74998),x=a(97434),h=a(24199);let{Option:f}=r.default;var v=e=>{let{value:t=[],onChange:a,disabledCallbacks:v=[],onDisabledCallbacksChange:_}=e,y=Object.entries(x.Dg).filter(e=>{let[t,a]=e;return a.supports_key_team_logging}).map(e=>{let[t,a]=e;return t}),b=Object.keys(x.Dg),j=e=>{null==a||a(e)},N=e=>{j(t.filter((t,a)=>a!==e))},w=(e,a,s)=>{let r=[...t];if("callback_name"===a){let t=x.Lo[s]||s;r[e]={...r[e],[a]:t,callback_vars:{}}}else r[e]={...r[e],[a]:s};j(r)},k=(e,a,s)=>{let r=[...t];r[e]={...r[e],callback_vars:{...r[e].callback_vars,[a]:s}},j(r)},C=(e,t)=>{var a,r;if(!e.callback_name)return null;let n=null===(a=Object.entries(x.Lo).find(t=>{let[a,s]=t;return s===e.callback_name}))||void 0===a?void 0:a[0];if(!n)return null;let o=(null===(r=x.Dg[n])||void 0===r?void 0:r.dynamic_params)||{};return 0===Object.keys(o).length?null:(0,s.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,s.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,s.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(o).map(a=>{let[r,n]=a;return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,s.jsx)("span",{children:r.replace(/_/g," ")}),(0,s.jsx)(l.Z,{title:"Environment variable reference recommended: os.environ/".concat(r.toUpperCase()),children:(0,s.jsx)(i.Z,{className:"text-gray-400 cursor-help text-xs"})}),"password"===n&&(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===n&&(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===n&&(0,s.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===n?(0,s.jsx)(h.Z,{step:.01,width:400,placeholder:"os.environ/".concat(r.toUpperCase()),value:e.callback_vars[r]||"",onChange:e=>k(t,r,e.target.value)}):(0,s.jsx)(d.Z,{type:"password"===n?"password":"text",placeholder:"os.environ/".concat(r.toUpperCase()),value:e.callback_vars[r]||"",onChange:e=>k(t,r,e.target.value)})]},r)})})]})};return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(u.Z,{className:"w-5 h-5 text-red-500"}),(0,s.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,s.jsx)(l.Z,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,s.jsx)(i.Z,{className:"text-gray-400 cursor-help"})})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,s.jsx)(r.default,{mode:"multiple",placeholder:"Select callbacks to disable",value:v,onChange:e=>{let t=(0,x.Z3)(e);null==_||_(t)},style:{width:"100%"},optionLabelProp:"label",children:b.map(e=>{var t,a;let r=null===(t=x.Dg[e])||void 0===t?void 0:t.logo,n=null===(a=x.Dg[e])||void 0===a?void 0:a.description;return(0,s.jsx)(f,{value:e,label:e,children:(0,s.jsx)(l.Z,{title:n,placement:"right",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,s.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(0,s.jsx)("span",{children:e})]})})},e)})}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,s.jsx)(n.Z,{}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(m.Z,{className:"w-5 h-5 text-blue-500"}),(0,s.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,s.jsx)(l.Z,{title:"Configure callback logging integrations for this team.",children:(0,s.jsx)(i.Z,{className:"text-gray-400 cursor-help"})})]}),(0,s.jsx)(o.Z,{variant:"secondary",onClick:()=>{j([...t,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:g.Z,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,s.jsx)("div",{className:"space-y-4",children:t.map((e,t)=>{var a,n;let i=e.callback_name?null===(a=Object.entries(x.Lo).find(t=>{let[a,s]=t;return s===e.callback_name}))||void 0===a?void 0:a[0]:void 0,d=i?null===(n=x.Dg[i])||void 0===n?void 0:n.logo:null;return(0,s.jsxs)(c.Z,{className:"border border-gray-200 shadow-sm hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,s.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,s.jsx)("img",{src:d,alt:i,className:"w-5 h-5 object-contain"}),(0,s.jsxs)("span",{className:"text-sm font-medium",children:[i||"New Integration"," Configuration"]})]}),(0,s.jsx)(o.Z,{variant:"light",onClick:()=>N(t),icon:p.Z,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,s.jsx)(r.default,{value:i,placeholder:"Select integration",onChange:e=>w(t,"callback_name",e),className:"w-full",optionLabelProp:"label",children:y.map(e=>{var t,a;let r=null===(t=x.Dg[e])||void 0===t?void 0:t.logo,n=null===(a=x.Dg[e])||void 0===a?void 0:a.description;return(0,s.jsx)(f,{value:e,label:e,children:(0,s.jsx)(l.Z,{title:n,placement:"right",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[r&&(0,s.jsx)("img",{src:r,alt:e,className:"w-4 h-4 object-contain",onError:t=>{let a=t.target,s=a.parentElement;if(s){let t=document.createElement("div");t.className="w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",t.textContent=e.charAt(0),s.replaceChild(t,a)}}}),(0,s.jsx)("span",{children:e})]})})},e)})})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,s.jsxs)(r.default,{value:e.callback_type,onChange:e=>w(t,"callback_type",e),className:"w-full",children:[(0,s.jsx)(f,{value:"success",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,s.jsx)("span",{children:"Success Only"})]})}),(0,s.jsx)(f,{value:"failure",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,s.jsx)("span",{children:"Failure Only"})]})}),(0,s.jsx)(f,{value:"success_and_failure",children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,s.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),C(e,t)]})]},t)})}),0===t.length&&(0,s.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,s.jsx)(m.Z,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,s.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,s.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}},97415:function(e,t,a){var s=a(57437),r=a(2265),l=a(52787),n=a(19250);t.Z=e=>{let{onChange:t,value:a,className:i,accessToken:o,placeholder:c="Select vector stores",disabled:d=!1}=e,[u,m]=(0,r.useState)([]),[g,p]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(o){p(!0);try{let e=await (0,n.vectorStoreListCall)(o);e.data&&m(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{p(!1)}}})()},[o]),(0,s.jsx)("div",{children:(0,s.jsx)(l.default,{mode:"multiple",placeholder:c,onChange:t,value:a,loading:g,className:i,options:u.map(e=>({label:"".concat(e.vector_store_name||e.vector_store_id," (").concat(e.vector_store_id,")"),value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})})}},59872:function(e,t,a){a.d(t,{nl:function(){return r},pw:function(){return l},vQ:function(){return n}});var s=a(9114);function r(e,t){let a=structuredClone(e);for(let[e,s]of Object.entries(t))e in a&&(a[e]=s);return a}let l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||!Number.isFinite(e))return"-";let s={minimumFractionDigits:t,maximumFractionDigits:t};if(!a)return e.toLocaleString("en-US",s);let r=Math.abs(e),l=r,n="";return r>=1e6?(l=r/1e6,n="M"):r>=1e3&&(l=r/1e3,n="K"),"".concat(e<0?"-":"").concat(l.toLocaleString("en-US",s)).concat(n)},n=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return i(e,t);try{return await navigator.clipboard.writeText(e),s.Z.success(t),!0}catch(a){return console.error("Clipboard API failed: ",a),i(e,t)}},i=(e,t)=>{try{let a=document.createElement("textarea");a.value=e,a.style.position="fixed",a.style.left="-999999px",a.style.top="-999999px",a.setAttribute("readonly",""),document.body.appendChild(a),a.focus(),a.select();let r=document.execCommand("copy");if(document.body.removeChild(a),r)return s.Z.success(t),!0;throw Error("execCommand failed")}catch(e){return s.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}}},20347:function(e,t,a){a.d(t,{LQ:function(){return l},ZL:function(){return s},lo:function(){return r},tY:function(){return n}});let s=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],r=["Internal User","Internal Viewer"],l=["Internal User","Admin","proxy_admin"],n=e=>s.includes(e)}}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/1529-e0933e3af843b646.js b/ui/litellm-dashboard/out/_next/static/chunks/1529-130888c02463f3dd.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/1529-e0933e3af843b646.js rename to ui/litellm-dashboard/out/_next/static/chunks/1529-130888c02463f3dd.js index 37fef532b26..5437eb2582c 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/1529-e0933e3af843b646.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/1529-130888c02463f3dd.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1529],{60440:function(e,n,t){t.d(n,{Z:function(){return u}});var r=t(1119),o=t(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"},l=t(55015),u=o.forwardRef(function(e,n){return o.createElement(l.Z,(0,r.Z)({},e,{ref:n,icon:i}))})},77565:function(e,n,t){t.d(n,{Z:function(){return u}});var r=t(1119),o=t(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"},l=t(55015),u=o.forwardRef(function(e,n){return o.createElement(l.Z,(0,r.Z)({},e,{ref:n,icon:i}))})},71030:function(e,n,t){t.d(n,{Z:function(){return C}});var r=t(1119),o=t(11993),i=t(26365),l=t(6989),u=t(97821),a=t(36760),c=t.n(a),s=t(28791),f=t(2265),d=t(95814),v=t(53346),p=d.Z.ESC,m=d.Z.TAB,b=(0,f.forwardRef)(function(e,n){var t=e.overlay,r=e.arrow,o=e.prefixCls,i=(0,f.useMemo)(function(){return"function"==typeof t?t():t},[t]),l=(0,s.sQ)(n,null==i?void 0:i.ref);return f.createElement(f.Fragment,null,r&&f.createElement("div",{className:"".concat(o,"-arrow")}),f.cloneElement(i,{ref:(0,s.Yr)(i)?l:void 0}))}),h={adjustX:1,adjustY:1},y=[0,0],g={topLeft:{points:["bl","tl"],overflow:h,offset:[0,-4],targetOffset:y},top:{points:["bc","tc"],overflow:h,offset:[0,-4],targetOffset:y},topRight:{points:["br","tr"],overflow:h,offset:[0,-4],targetOffset:y},bottomLeft:{points:["tl","bl"],overflow:h,offset:[0,4],targetOffset:y},bottom:{points:["tc","bc"],overflow:h,offset:[0,4],targetOffset:y},bottomRight:{points:["tr","br"],overflow:h,offset:[0,4],targetOffset:y}},Z=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"],C=f.forwardRef(function(e,n){var t,a,d,h,y,C,E,w,k,M,R,N,x,P,S=e.arrow,I=void 0!==S&&S,K=e.prefixCls,A=void 0===K?"rc-dropdown":K,O=e.transitionName,T=e.animation,L=e.align,D=e.placement,_=e.placements,V=e.getPopupContainer,z=e.showAction,F=e.hideAction,j=e.overlayClassName,B=e.overlayStyle,W=e.visible,H=e.trigger,Y=void 0===H?["hover"]:H,q=e.autoFocus,X=e.overlay,G=e.children,Q=e.onVisibleChange,U=(0,l.Z)(e,Z),J=f.useState(),$=(0,i.Z)(J,2),ee=$[0],en=$[1],et="visible"in e?W:ee,er=f.useRef(null),eo=f.useRef(null),ei=f.useRef(null);f.useImperativeHandle(n,function(){return er.current});var el=function(e){en(e),null==Q||Q(e)};a=(t={visible:et,triggerRef:ei,onVisibleChange:el,autoFocus:q,overlayRef:eo}).visible,d=t.triggerRef,h=t.onVisibleChange,y=t.autoFocus,C=t.overlayRef,E=f.useRef(!1),w=function(){if(a){var e,n;null===(e=d.current)||void 0===e||null===(n=e.focus)||void 0===n||n.call(e),null==h||h(!1)}},k=function(){var e;return null!==(e=C.current)&&void 0!==e&&!!e.focus&&(C.current.focus(),E.current=!0,!0)},M=function(e){switch(e.keyCode){case p:w();break;case m:var n=!1;E.current||(n=k()),n?e.preventDefault():w()}},f.useEffect(function(){return a?(window.addEventListener("keydown",M),y&&(0,v.Z)(k,3),function(){window.removeEventListener("keydown",M),E.current=!1}):function(){E.current=!1}},[a]);var eu=function(){return f.createElement(b,{ref:eo,overlay:X,prefixCls:A,arrow:I})},ea=f.cloneElement(G,{className:c()(null===(P=G.props)||void 0===P?void 0:P.className,et&&(void 0!==(R=e.openClassName)?R:"".concat(A,"-open"))),ref:(0,s.Yr)(G)?(0,s.sQ)(ei,G.ref):void 0}),ec=F;return ec||-1===Y.indexOf("contextMenu")||(ec=["click"]),f.createElement(u.Z,(0,r.Z)({builtinPlacements:void 0===_?g:_},U,{prefixCls:A,ref:er,popupClassName:c()(j,(0,o.Z)({},"".concat(A,"-show-arrow"),I)),popupStyle:B,action:Y,showAction:z,hideAction:ec,popupPlacement:void 0===D?"bottomLeft":D,popupAlign:L,popupTransitionName:O,popupAnimation:T,popupVisible:et,stretch:(N=e.minOverlayWidthMatchTrigger,x=e.alignPoint,"minOverlayWidthMatchTrigger"in e?N:!x)?"minWidth":"",popup:"function"==typeof X?eu:eu(),onPopupVisibleChange:el,onPopupClick:function(n){var t=e.onOverlayClick;en(!1),t&&t(n)},getPopupContainer:V}),ea)})},33082:function(e,n,t){t.d(n,{iz:function(){return eD},ck:function(){return ep},BW:function(){return eL},sN:function(){return ep},Wd:function(){return eI},ZP:function(){return ej},Xl:function(){return N}});var r=t(1119),o=t(11993),i=t(31686),l=t(83145),u=t(26365),a=t(6989),c=t(36760),s=t.n(c),f=t(1699),d=t(50506),v=t(16671),p=t(32559),m=t(2265),b=t(54887),h=m.createContext(null);function y(e,n){return void 0===e?null:"".concat(e,"-").concat(n)}function g(e){return y(m.useContext(h),e)}var Z=t(6397),C=["children","locked"],E=m.createContext(null);function w(e){var n=e.children,t=e.locked,r=(0,a.Z)(e,C),o=m.useContext(E),l=(0,Z.Z)(function(){var e;return e=(0,i.Z)({},o),Object.keys(r).forEach(function(n){var t=r[n];void 0!==t&&(e[n]=t)}),e},[o,r],function(e,n){return!t&&(e[0]!==n[0]||!(0,v.Z)(e[1],n[1],!0))});return m.createElement(E.Provider,{value:l},n)}var k=m.createContext(null);function M(){return m.useContext(k)}var R=m.createContext([]);function N(e){var n=m.useContext(R);return m.useMemo(function(){return void 0!==e?[].concat((0,l.Z)(n),[e]):n},[n,e])}var x=m.createContext(null),P=m.createContext({}),S=t(2857);function I(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,S.Z)(e)){var t=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(t)||e.isContentEditable||"a"===t&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o),l=null;return o&&!Number.isNaN(i)?l=i:r&&null===l&&(l=0),r&&e.disabled&&(l=null),null!==l&&(l>=0||n&&l<0)}return!1}var K=t(95814),A=t(53346),O=K.Z.LEFT,T=K.Z.RIGHT,L=K.Z.UP,D=K.Z.DOWN,_=K.Z.ENTER,V=K.Z.ESC,z=K.Z.HOME,F=K.Z.END,j=[L,D,O,T];function B(e,n){return(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(0,l.Z)(e.querySelectorAll("*")).filter(function(e){return I(e,n)});return I(e,n)&&t.unshift(e),t})(e,!0).filter(function(e){return n.has(e)})}function W(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var o=B(e,n),i=o.length,l=o.findIndex(function(e){return t===e});return r<0?-1===l?l=i-1:l-=1:r>0&&(l+=1),o[l=(l+i)%i]}var H=function(e,n){var t=new Set,r=new Map,o=new Map;return e.forEach(function(e){var i=document.querySelector("[data-menu-id='".concat(y(n,e),"']"));i&&(t.add(i),o.set(i,e),r.set(e,i))}),{elements:t,key2element:r,element2key:o}},Y="__RC_UTIL_PATH_SPLIT__",q=function(e){return e.join(Y)},X="rc-menu-more";function G(e){var n=m.useRef(e);n.current=e;var t=m.useCallback(function(){for(var e,t=arguments.length,r=Array(t),o=0;o1&&(k.motionAppear=!1);var M=k.onVisibleChanged;return(k.onVisibleChanged=function(e){return b.current||e||Z(!0),null==M?void 0:M(e)},g)?null:m.createElement(w,{mode:a,locked:!b.current},m.createElement(eR.ZP,(0,r.Z)({visible:C},k,{forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(e){var t=e.className,r=e.style;return m.createElement(eb,{id:n,className:t,style:r},l)}))}var ex=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],eP=["active"],eS=function(e){var n,t=e.style,l=e.className,c=e.title,d=e.eventKey,v=(e.warnKey,e.disabled),p=e.internalPopupClose,b=e.children,h=e.itemIcon,y=e.expandIcon,Z=e.popupClassName,C=e.popupOffset,k=e.popupStyle,M=e.onClick,R=e.onMouseEnter,S=e.onMouseLeave,I=e.onTitleClick,K=e.onTitleMouseEnter,A=e.onTitleMouseLeave,O=(0,a.Z)(e,ex),T=g(d),L=m.useContext(E),D=L.prefixCls,_=L.mode,V=L.openKeys,z=L.disabled,F=L.overflowDisabled,j=L.activeKey,B=L.selectedKeys,W=L.itemIcon,H=L.expandIcon,Y=L.onItemClick,q=L.onOpenChange,X=L.onActive,Q=m.useContext(P)._internalRenderSubMenuItem,U=m.useContext(x).isSubPathKey,J=N(),$="".concat(D,"-submenu"),ee=z||v,en=m.useRef(),et=m.useRef(),er=null!=y?y:H,eu=V.includes(d),ec=!F&&eu,es=U(B,d),ef=eo(d,ee,K,A),ed=ef.active,ev=(0,a.Z)(ef,eP),ep=m.useState(!1),em=(0,u.Z)(ep,2),eh=em[0],ey=em[1],eg=function(e){ee||ey(e)},eZ=m.useMemo(function(){return ed||"inline"!==_&&(eh||U([j],d))},[_,ed,j,eh,d,U]),eC=ei(J.length),eE=G(function(e){null==M||M(ea(e)),Y(e)}),ew=T&&"".concat(T,"-popup"),ek=m.createElement("div",(0,r.Z)({role:"menuitem",style:eC,className:"".concat($,"-title"),tabIndex:ee?null:-1,ref:en,title:"string"==typeof c?c:null,"data-menu-id":F&&T?null:T,"aria-expanded":ec,"aria-haspopup":!0,"aria-controls":ew,"aria-disabled":ee,onClick:function(e){ee||(null==I||I({key:d,domEvent:e}),"inline"===_&&q(d,!eu))},onFocus:function(){X(d)}},ev),c,m.createElement(el,{icon:"horizontal"!==_?er:void 0,props:(0,i.Z)((0,i.Z)({},e),{},{isOpen:ec,isSubMenu:!0})},m.createElement("i",{className:"".concat($,"-arrow")}))),eR=m.useRef(_);if("inline"!==_&&J.length>1?eR.current="vertical":eR.current=_,!F){var eS=eR.current;ek=m.createElement(eM,{mode:eS,prefixCls:$,visible:!p&&ec&&"inline"!==_,popupClassName:Z,popupOffset:C,popupStyle:k,popup:m.createElement(w,{mode:"horizontal"===eS?"vertical":eS},m.createElement(eb,{id:ew,ref:et},b)),disabled:ee,onVisibleChange:function(e){"inline"!==_&&q(d,e)}},ek)}var eI=m.createElement(f.Z.Item,(0,r.Z)({role:"none"},O,{component:"li",style:t,className:s()($,"".concat($,"-").concat(_),l,(n={},(0,o.Z)(n,"".concat($,"-open"),ec),(0,o.Z)(n,"".concat($,"-active"),eZ),(0,o.Z)(n,"".concat($,"-selected"),es),(0,o.Z)(n,"".concat($,"-disabled"),ee),n)),onMouseEnter:function(e){eg(!0),null==R||R({key:d,domEvent:e})},onMouseLeave:function(e){eg(!1),null==S||S({key:d,domEvent:e})}}),ek,!F&&m.createElement(eN,{id:ew,open:ec,keyPath:J},b));return Q&&(eI=Q(eI,e,{selected:es,active:eZ,open:ec,disabled:ee})),m.createElement(w,{onItemClick:eE,mode:"horizontal"===_?"vertical":_,itemIcon:null!=h?h:W,expandIcon:er},eI)};function eI(e){var n,t=e.eventKey,r=e.children,o=N(t),i=ey(r,o),l=M();return m.useEffect(function(){if(l)return l.registerPath(t,o),function(){l.unregisterPath(t,o)}},[o]),n=l?i:m.createElement(eS,e,i),m.createElement(R.Provider,{value:o},n)}var eK=t(41154),eA=["className","title","eventKey","children"],eO=["children"],eT=function(e){var n=e.className,t=e.title,o=(e.eventKey,e.children),i=(0,a.Z)(e,eA),l=m.useContext(E).prefixCls,u="".concat(l,"-item-group");return m.createElement("li",(0,r.Z)({role:"presentation"},i,{onClick:function(e){return e.stopPropagation()},className:s()(u,n)}),m.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:"string"==typeof t?t:void 0},t),m.createElement("ul",{role:"group",className:"".concat(u,"-list")},o))};function eL(e){var n=e.children,t=(0,a.Z)(e,eO),r=ey(n,N(t.eventKey));return M()?r:m.createElement(eT,(0,et.Z)(t,["warnKey"]),r)}function eD(e){var n=e.className,t=e.style,r=m.useContext(E).prefixCls;return M()?null:m.createElement("li",{role:"separator",className:s()("".concat(r,"-item-divider"),n),style:t})}var e_=["label","children","key","type"],eV=["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"],ez=[],eF=m.forwardRef(function(e,n){var t,c,p,y,g,Z,C,E,M,R,N,S,I,K,J,$,ee,en,et,er,eo,ei,el,eu,ec,es,ef,ed=e.prefixCls,ev=void 0===ed?"rc-menu":ed,em=e.rootClassName,eb=e.style,eh=e.className,eg=e.tabIndex,eZ=e.items,eC=e.children,eE=e.direction,ew=e.id,ek=e.mode,eM=void 0===ek?"vertical":ek,eR=e.inlineCollapsed,eN=e.disabled,ex=e.disabledOverflow,eP=e.subMenuOpenDelay,eS=e.subMenuCloseDelay,eA=e.forceSubMenuRender,eO=e.defaultOpenKeys,eT=e.openKeys,eF=e.activeKey,ej=e.defaultActiveFirst,eB=e.selectable,eW=void 0===eB||eB,eH=e.multiple,eY=void 0!==eH&&eH,eq=e.defaultSelectedKeys,eX=e.selectedKeys,eG=e.onSelect,eQ=e.onDeselect,eU=e.inlineIndent,eJ=e.motion,e$=e.defaultMotions,e0=e.triggerSubMenuAction,e1=e.builtinPlacements,e6=e.itemIcon,e2=e.expandIcon,e5=e.overflowedIndicator,e9=void 0===e5?"...":e5,e3=e.overflowedIndicatorPopupClassName,e4=e.getPopupContainer,e7=e.onClick,e8=e.onOpenChange,ne=e.onKeyDown,nn=(e.openAnimation,e.openTransitionName,e._internalRenderMenuItem),nt=e._internalRenderSubMenuItem,nr=(0,a.Z)(e,eV),no=m.useMemo(function(){var e;return e=eC,eZ&&(e=function e(n){return(n||[]).map(function(n,t){if(n&&"object"===(0,eK.Z)(n)){var o=n.label,i=n.children,l=n.key,u=n.type,c=(0,a.Z)(n,e_),s=null!=l?l:"tmp-".concat(t);return i||"group"===u?"group"===u?m.createElement(eL,(0,r.Z)({key:s},c,{title:o}),e(i)):m.createElement(eI,(0,r.Z)({key:s},c,{title:o}),e(i)):"divider"===u?m.createElement(eD,(0,r.Z)({key:s},c)):m.createElement(ep,(0,r.Z)({key:s},c),o)}return null}).filter(function(e){return e})}(eZ)),ey(e,ez)},[eC,eZ]),ni=m.useState(!1),nl=(0,u.Z)(ni,2),nu=nl[0],na=nl[1],nc=m.useRef(),ns=(t=(0,d.Z)(ew,{value:ew}),p=(c=(0,u.Z)(t,2))[0],y=c[1],m.useEffect(function(){U+=1;var e="".concat(Q,"-").concat(U);y("rc-menu-uuid-".concat(e))},[]),p),nf="rtl"===eE,nd=(0,d.Z)(eO,{value:eT,postState:function(e){return e||ez}}),nv=(0,u.Z)(nd,2),np=nv[0],nm=nv[1],nb=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function t(){nm(e),null==e8||e8(e)}n?(0,b.flushSync)(t):t()},nh=m.useState(np),ny=(0,u.Z)(nh,2),ng=ny[0],nZ=ny[1],nC=m.useRef(!1),nE=m.useMemo(function(){return("inline"===eM||"vertical"===eM)&&eR?["vertical",eR]:[eM,!1]},[eM,eR]),nw=(0,u.Z)(nE,2),nk=nw[0],nM=nw[1],nR="inline"===nk,nN=m.useState(nk),nx=(0,u.Z)(nN,2),nP=nx[0],nS=nx[1],nI=m.useState(nM),nK=(0,u.Z)(nI,2),nA=nK[0],nO=nK[1];m.useEffect(function(){nS(nk),nO(nM),nC.current&&(nR?nm(ng):nb(ez))},[nk,nM]);var nT=m.useState(0),nL=(0,u.Z)(nT,2),nD=nL[0],n_=nL[1],nV=nD>=no.length-1||"horizontal"!==nP||ex;m.useEffect(function(){nR&&nZ(np)},[np]),m.useEffect(function(){return nC.current=!0,function(){nC.current=!1}},[]);var nz=(g=m.useState({}),Z=(0,u.Z)(g,2)[1],C=(0,m.useRef)(new Map),E=(0,m.useRef)(new Map),M=m.useState([]),N=(R=(0,u.Z)(M,2))[0],S=R[1],I=(0,m.useRef)(0),K=(0,m.useRef)(!1),J=function(){K.current||Z({})},$=(0,m.useCallback)(function(e,n){var t,r=q(n);E.current.set(r,e),C.current.set(e,r),I.current+=1;var o=I.current;t=function(){o===I.current&&J()},Promise.resolve().then(t)},[]),ee=(0,m.useCallback)(function(e,n){var t=q(n);E.current.delete(t),C.current.delete(e)},[]),en=(0,m.useCallback)(function(e){S(e)},[]),et=(0,m.useCallback)(function(e,n){var t=(C.current.get(e)||"").split(Y);return n&&N.includes(t[0])&&t.unshift(X),t},[N]),er=(0,m.useCallback)(function(e,n){return e.some(function(e){return et(e,!0).includes(n)})},[et]),eo=(0,m.useCallback)(function(e){var n="".concat(C.current.get(e)).concat(Y),t=new Set;return(0,l.Z)(E.current.keys()).forEach(function(e){e.startsWith(n)&&t.add(E.current.get(e))}),t},[]),m.useEffect(function(){return function(){K.current=!0}},[]),{registerPath:$,unregisterPath:ee,refreshOverflowKeys:en,isSubPathKey:er,getKeyPath:et,getKeys:function(){var e=(0,l.Z)(C.current.keys());return N.length&&e.push(X),e},getSubPathKeys:eo}),nF=nz.registerPath,nj=nz.unregisterPath,nB=nz.refreshOverflowKeys,nW=nz.isSubPathKey,nH=nz.getKeyPath,nY=nz.getKeys,nq=nz.getSubPathKeys,nX=m.useMemo(function(){return{registerPath:nF,unregisterPath:nj}},[nF,nj]),nG=m.useMemo(function(){return{isSubPathKey:nW}},[nW]);m.useEffect(function(){nB(nV?ez:no.slice(nD+1).map(function(e){return e.key}))},[nD,nV]);var nQ=(0,d.Z)(eF||ej&&(null===(es=no[0])||void 0===es?void 0:es.key),{value:eF}),nU=(0,u.Z)(nQ,2),nJ=nU[0],n$=nU[1],n0=G(function(e){n$(e)}),n1=G(function(){n$(void 0)});(0,m.useImperativeHandle)(n,function(){return{list:nc.current,focus:function(e){var n,t,r=H(nY(),ns),o=r.elements,i=r.key2element,l=r.element2key,u=B(nc.current,o),a=null!=nJ?nJ:u[0]?l.get(u[0]):null===(n=no.find(function(e){return!e.props.disabled}))||void 0===n?void 0:n.key,c=i.get(a);a&&c&&(null==c||null===(t=c.focus)||void 0===t||t.call(c,e))}}});var n6=(0,d.Z)(eq||[],{value:eX,postState:function(e){return Array.isArray(e)?e:null==e?ez:[e]}}),n2=(0,u.Z)(n6,2),n5=n2[0],n9=n2[1],n3=function(e){if(eW){var n,t=e.key,r=n5.includes(t);n9(n=eY?r?n5.filter(function(e){return e!==t}):[].concat((0,l.Z)(n5),[t]):[t]);var o=(0,i.Z)((0,i.Z)({},e),{},{selectedKeys:n});r?null==eQ||eQ(o):null==eG||eG(o)}!eY&&np.length&&"inline"!==nP&&nb(ez)},n4=G(function(e){null==e7||e7(ea(e)),n3(e)}),n7=G(function(e,n){var t=np.filter(function(n){return n!==e});if(n)t.push(e);else if("inline"!==nP){var r=nq(e);t=t.filter(function(e){return!r.has(e)})}(0,v.Z)(np,t,!0)||nb(t,!0)}),n8=(ei=function(e,n){var t=null!=n?n:!np.includes(e);n7(e,t)},el=m.useRef(),(eu=m.useRef()).current=nJ,ec=function(){A.Z.cancel(el.current)},m.useEffect(function(){return function(){ec()}},[]),function(e){var n=e.which;if([].concat(j,[_,V,z,F]).includes(n)){var t=nY(),r=H(t,ns),i=r,l=i.elements,u=i.key2element,a=i.element2key,c=function(e,n){for(var t=e||document.activeElement;t;){if(n.has(t))return t;t=t.parentElement}return null}(u.get(nJ),l),s=a.get(c),f=function(e,n,t,r){var i,l,u,a,c="prev",s="next",f="children",d="parent";if("inline"===e&&r===_)return{inlineTrigger:!0};var v=(i={},(0,o.Z)(i,L,c),(0,o.Z)(i,D,s),i),p=(l={},(0,o.Z)(l,O,t?s:c),(0,o.Z)(l,T,t?c:s),(0,o.Z)(l,D,f),(0,o.Z)(l,_,f),l),m=(u={},(0,o.Z)(u,L,c),(0,o.Z)(u,D,s),(0,o.Z)(u,_,f),(0,o.Z)(u,V,d),(0,o.Z)(u,O,t?f:d),(0,o.Z)(u,T,t?d:f),u);switch(null===(a=({inline:v,horizontal:p,vertical:m,inlineSub:v,horizontalSub:m,verticalSub:m})["".concat(e).concat(n?"":"Sub")])||void 0===a?void 0:a[r]){case c:return{offset:-1,sibling:!0};case s:return{offset:1,sibling:!0};case d:return{offset:-1,sibling:!1};case f:return{offset:1,sibling:!1};default:return null}}(nP,1===nH(s,!0).length,nf,n);if(!f&&n!==z&&n!==F)return;(j.includes(n)||[z,F].includes(n))&&e.preventDefault();var d=function(e){if(e){var n=e,t=e.querySelector("a");null!=t&&t.getAttribute("href")&&(n=t);var r=a.get(e);n$(r),ec(),el.current=(0,A.Z)(function(){eu.current===r&&n.focus()})}};if([z,F].includes(n)||f.sibling||!c){var v,p=B(v=c&&"inline"!==nP?function(e){for(var n=e;n;){if(n.getAttribute("data-menu-list"))return n;n=n.parentElement}return null}(c):nc.current,l);d(n===z?p[0]:n===F?p[p.length-1]:W(v,l,c,f.offset))}else if(f.inlineTrigger)ei(s);else if(f.offset>0)ei(s,!0),ec(),el.current=(0,A.Z)(function(){r=H(t,ns);var e=c.getAttribute("aria-controls");d(W(document.getElementById(e),r.elements))},5);else if(f.offset<0){var m=nH(s,!0),b=m[m.length-2],h=u.get(b);ei(b,!1),d(h)}}null==ne||ne(e)});m.useEffect(function(){na(!0)},[]);var te=m.useMemo(function(){return{_internalRenderMenuItem:nn,_internalRenderSubMenuItem:nt}},[nn,nt]),tn="horizontal"!==nP||ex?no:no.map(function(e,n){return m.createElement(w,{key:e.key,overflowDisabled:n>nD},e)}),tt=m.createElement(f.Z,(0,r.Z)({id:ew,ref:nc,prefixCls:"".concat(ev,"-overflow"),component:"ul",itemComponent:ep,className:s()(ev,"".concat(ev,"-root"),"".concat(ev,"-").concat(nP),eh,(ef={},(0,o.Z)(ef,"".concat(ev,"-inline-collapsed"),nA),(0,o.Z)(ef,"".concat(ev,"-rtl"),nf),ef),em),dir:eE,style:eb,role:"menu",tabIndex:void 0===eg?0:eg,data:tn,renderRawItem:function(e){return e},renderRawRest:function(e){var n=e.length,t=n?no.slice(-n):null;return m.createElement(eI,{eventKey:X,title:e9,disabled:nV,internalPopupClose:0===n,popupClassName:e3},t)},maxCount:"horizontal"!==nP||ex?f.Z.INVALIDATE:f.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){n_(e)},onKeyDown:n8},nr));return m.createElement(P.Provider,{value:te},m.createElement(h.Provider,{value:ns},m.createElement(w,{prefixCls:ev,rootClassName:em,mode:nP,openKeys:np,rtl:nf,disabled:eN,motion:nu?eJ:null,defaultMotions:nu?e$:null,activeKey:nJ,onActive:n0,onInactive:n1,selectedKeys:n5,inlineIndent:void 0===eU?24:eU,subMenuOpenDelay:void 0===eP?.1:eP,subMenuCloseDelay:void 0===eS?.1:eS,forceSubMenuRender:eA,builtinPlacements:e1,triggerSubMenuAction:void 0===e0?"hover":e0,getPopupContainer:e4,itemIcon:e6,expandIcon:e2,onItemClick:n4,onOpenChange:n7},m.createElement(x.Provider,{value:nG},tt),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(k.Provider,{value:nX},no)))))});eF.Item=ep,eF.SubMenu=eI,eF.ItemGroup=eL,eF.Divider=eD;var ej=eF}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1529],{39760:function(e,n,t){t.d(n,{Z:function(){return u}});var r=t(1119),o=t(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"},l=t(55015),u=o.forwardRef(function(e,n){return o.createElement(l.Z,(0,r.Z)({},e,{ref:n,icon:i}))})},77565:function(e,n,t){t.d(n,{Z:function(){return u}});var r=t(1119),o=t(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"},l=t(55015),u=o.forwardRef(function(e,n){return o.createElement(l.Z,(0,r.Z)({},e,{ref:n,icon:i}))})},71030:function(e,n,t){t.d(n,{Z:function(){return C}});var r=t(1119),o=t(11993),i=t(26365),l=t(6989),u=t(97821),a=t(36760),c=t.n(a),s=t(28791),f=t(2265),d=t(95814),v=t(53346),p=d.Z.ESC,m=d.Z.TAB,b=(0,f.forwardRef)(function(e,n){var t=e.overlay,r=e.arrow,o=e.prefixCls,i=(0,f.useMemo)(function(){return"function"==typeof t?t():t},[t]),l=(0,s.sQ)(n,null==i?void 0:i.ref);return f.createElement(f.Fragment,null,r&&f.createElement("div",{className:"".concat(o,"-arrow")}),f.cloneElement(i,{ref:(0,s.Yr)(i)?l:void 0}))}),h={adjustX:1,adjustY:1},y=[0,0],g={topLeft:{points:["bl","tl"],overflow:h,offset:[0,-4],targetOffset:y},top:{points:["bc","tc"],overflow:h,offset:[0,-4],targetOffset:y},topRight:{points:["br","tr"],overflow:h,offset:[0,-4],targetOffset:y},bottomLeft:{points:["tl","bl"],overflow:h,offset:[0,4],targetOffset:y},bottom:{points:["tc","bc"],overflow:h,offset:[0,4],targetOffset:y},bottomRight:{points:["tr","br"],overflow:h,offset:[0,4],targetOffset:y}},Z=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"],C=f.forwardRef(function(e,n){var t,a,d,h,y,C,E,w,k,M,R,N,x,P,S=e.arrow,I=void 0!==S&&S,K=e.prefixCls,A=void 0===K?"rc-dropdown":K,O=e.transitionName,T=e.animation,L=e.align,D=e.placement,_=e.placements,V=e.getPopupContainer,z=e.showAction,F=e.hideAction,j=e.overlayClassName,B=e.overlayStyle,W=e.visible,H=e.trigger,Y=void 0===H?["hover"]:H,q=e.autoFocus,X=e.overlay,G=e.children,Q=e.onVisibleChange,U=(0,l.Z)(e,Z),J=f.useState(),$=(0,i.Z)(J,2),ee=$[0],en=$[1],et="visible"in e?W:ee,er=f.useRef(null),eo=f.useRef(null),ei=f.useRef(null);f.useImperativeHandle(n,function(){return er.current});var el=function(e){en(e),null==Q||Q(e)};a=(t={visible:et,triggerRef:ei,onVisibleChange:el,autoFocus:q,overlayRef:eo}).visible,d=t.triggerRef,h=t.onVisibleChange,y=t.autoFocus,C=t.overlayRef,E=f.useRef(!1),w=function(){if(a){var e,n;null===(e=d.current)||void 0===e||null===(n=e.focus)||void 0===n||n.call(e),null==h||h(!1)}},k=function(){var e;return null!==(e=C.current)&&void 0!==e&&!!e.focus&&(C.current.focus(),E.current=!0,!0)},M=function(e){switch(e.keyCode){case p:w();break;case m:var n=!1;E.current||(n=k()),n?e.preventDefault():w()}},f.useEffect(function(){return a?(window.addEventListener("keydown",M),y&&(0,v.Z)(k,3),function(){window.removeEventListener("keydown",M),E.current=!1}):function(){E.current=!1}},[a]);var eu=function(){return f.createElement(b,{ref:eo,overlay:X,prefixCls:A,arrow:I})},ea=f.cloneElement(G,{className:c()(null===(P=G.props)||void 0===P?void 0:P.className,et&&(void 0!==(R=e.openClassName)?R:"".concat(A,"-open"))),ref:(0,s.Yr)(G)?(0,s.sQ)(ei,G.ref):void 0}),ec=F;return ec||-1===Y.indexOf("contextMenu")||(ec=["click"]),f.createElement(u.Z,(0,r.Z)({builtinPlacements:void 0===_?g:_},U,{prefixCls:A,ref:er,popupClassName:c()(j,(0,o.Z)({},"".concat(A,"-show-arrow"),I)),popupStyle:B,action:Y,showAction:z,hideAction:ec,popupPlacement:void 0===D?"bottomLeft":D,popupAlign:L,popupTransitionName:O,popupAnimation:T,popupVisible:et,stretch:(N=e.minOverlayWidthMatchTrigger,x=e.alignPoint,"minOverlayWidthMatchTrigger"in e?N:!x)?"minWidth":"",popup:"function"==typeof X?eu:eu(),onPopupVisibleChange:el,onPopupClick:function(n){var t=e.onOverlayClick;en(!1),t&&t(n)},getPopupContainer:V}),ea)})},33082:function(e,n,t){t.d(n,{iz:function(){return eD},ck:function(){return ep},BW:function(){return eL},sN:function(){return ep},Wd:function(){return eI},ZP:function(){return ej},Xl:function(){return N}});var r=t(1119),o=t(11993),i=t(31686),l=t(83145),u=t(26365),a=t(6989),c=t(36760),s=t.n(c),f=t(1699),d=t(50506),v=t(16671),p=t(32559),m=t(2265),b=t(54887),h=m.createContext(null);function y(e,n){return void 0===e?null:"".concat(e,"-").concat(n)}function g(e){return y(m.useContext(h),e)}var Z=t(6397),C=["children","locked"],E=m.createContext(null);function w(e){var n=e.children,t=e.locked,r=(0,a.Z)(e,C),o=m.useContext(E),l=(0,Z.Z)(function(){var e;return e=(0,i.Z)({},o),Object.keys(r).forEach(function(n){var t=r[n];void 0!==t&&(e[n]=t)}),e},[o,r],function(e,n){return!t&&(e[0]!==n[0]||!(0,v.Z)(e[1],n[1],!0))});return m.createElement(E.Provider,{value:l},n)}var k=m.createContext(null);function M(){return m.useContext(k)}var R=m.createContext([]);function N(e){var n=m.useContext(R);return m.useMemo(function(){return void 0!==e?[].concat((0,l.Z)(n),[e]):n},[n,e])}var x=m.createContext(null),P=m.createContext({}),S=t(2857);function I(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if((0,S.Z)(e)){var t=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(t)||e.isContentEditable||"a"===t&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),i=Number(o),l=null;return o&&!Number.isNaN(i)?l=i:r&&null===l&&(l=0),r&&e.disabled&&(l=null),null!==l&&(l>=0||n&&l<0)}return!1}var K=t(95814),A=t(53346),O=K.Z.LEFT,T=K.Z.RIGHT,L=K.Z.UP,D=K.Z.DOWN,_=K.Z.ENTER,V=K.Z.ESC,z=K.Z.HOME,F=K.Z.END,j=[L,D,O,T];function B(e,n){return(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(0,l.Z)(e.querySelectorAll("*")).filter(function(e){return I(e,n)});return I(e,n)&&t.unshift(e),t})(e,!0).filter(function(e){return n.has(e)})}function W(e,n,t){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(!e)return null;var o=B(e,n),i=o.length,l=o.findIndex(function(e){return t===e});return r<0?-1===l?l=i-1:l-=1:r>0&&(l+=1),o[l=(l+i)%i]}var H=function(e,n){var t=new Set,r=new Map,o=new Map;return e.forEach(function(e){var i=document.querySelector("[data-menu-id='".concat(y(n,e),"']"));i&&(t.add(i),o.set(i,e),r.set(e,i))}),{elements:t,key2element:r,element2key:o}},Y="__RC_UTIL_PATH_SPLIT__",q=function(e){return e.join(Y)},X="rc-menu-more";function G(e){var n=m.useRef(e);n.current=e;var t=m.useCallback(function(){for(var e,t=arguments.length,r=Array(t),o=0;o1&&(k.motionAppear=!1);var M=k.onVisibleChanged;return(k.onVisibleChanged=function(e){return b.current||e||Z(!0),null==M?void 0:M(e)},g)?null:m.createElement(w,{mode:a,locked:!b.current},m.createElement(eR.ZP,(0,r.Z)({visible:C},k,{forceRender:f,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(e){var t=e.className,r=e.style;return m.createElement(eb,{id:n,className:t,style:r},l)}))}var ex=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],eP=["active"],eS=function(e){var n,t=e.style,l=e.className,c=e.title,d=e.eventKey,v=(e.warnKey,e.disabled),p=e.internalPopupClose,b=e.children,h=e.itemIcon,y=e.expandIcon,Z=e.popupClassName,C=e.popupOffset,k=e.popupStyle,M=e.onClick,R=e.onMouseEnter,S=e.onMouseLeave,I=e.onTitleClick,K=e.onTitleMouseEnter,A=e.onTitleMouseLeave,O=(0,a.Z)(e,ex),T=g(d),L=m.useContext(E),D=L.prefixCls,_=L.mode,V=L.openKeys,z=L.disabled,F=L.overflowDisabled,j=L.activeKey,B=L.selectedKeys,W=L.itemIcon,H=L.expandIcon,Y=L.onItemClick,q=L.onOpenChange,X=L.onActive,Q=m.useContext(P)._internalRenderSubMenuItem,U=m.useContext(x).isSubPathKey,J=N(),$="".concat(D,"-submenu"),ee=z||v,en=m.useRef(),et=m.useRef(),er=null!=y?y:H,eu=V.includes(d),ec=!F&&eu,es=U(B,d),ef=eo(d,ee,K,A),ed=ef.active,ev=(0,a.Z)(ef,eP),ep=m.useState(!1),em=(0,u.Z)(ep,2),eh=em[0],ey=em[1],eg=function(e){ee||ey(e)},eZ=m.useMemo(function(){return ed||"inline"!==_&&(eh||U([j],d))},[_,ed,j,eh,d,U]),eC=ei(J.length),eE=G(function(e){null==M||M(ea(e)),Y(e)}),ew=T&&"".concat(T,"-popup"),ek=m.createElement("div",(0,r.Z)({role:"menuitem",style:eC,className:"".concat($,"-title"),tabIndex:ee?null:-1,ref:en,title:"string"==typeof c?c:null,"data-menu-id":F&&T?null:T,"aria-expanded":ec,"aria-haspopup":!0,"aria-controls":ew,"aria-disabled":ee,onClick:function(e){ee||(null==I||I({key:d,domEvent:e}),"inline"===_&&q(d,!eu))},onFocus:function(){X(d)}},ev),c,m.createElement(el,{icon:"horizontal"!==_?er:void 0,props:(0,i.Z)((0,i.Z)({},e),{},{isOpen:ec,isSubMenu:!0})},m.createElement("i",{className:"".concat($,"-arrow")}))),eR=m.useRef(_);if("inline"!==_&&J.length>1?eR.current="vertical":eR.current=_,!F){var eS=eR.current;ek=m.createElement(eM,{mode:eS,prefixCls:$,visible:!p&&ec&&"inline"!==_,popupClassName:Z,popupOffset:C,popupStyle:k,popup:m.createElement(w,{mode:"horizontal"===eS?"vertical":eS},m.createElement(eb,{id:ew,ref:et},b)),disabled:ee,onVisibleChange:function(e){"inline"!==_&&q(d,e)}},ek)}var eI=m.createElement(f.Z.Item,(0,r.Z)({role:"none"},O,{component:"li",style:t,className:s()($,"".concat($,"-").concat(_),l,(n={},(0,o.Z)(n,"".concat($,"-open"),ec),(0,o.Z)(n,"".concat($,"-active"),eZ),(0,o.Z)(n,"".concat($,"-selected"),es),(0,o.Z)(n,"".concat($,"-disabled"),ee),n)),onMouseEnter:function(e){eg(!0),null==R||R({key:d,domEvent:e})},onMouseLeave:function(e){eg(!1),null==S||S({key:d,domEvent:e})}}),ek,!F&&m.createElement(eN,{id:ew,open:ec,keyPath:J},b));return Q&&(eI=Q(eI,e,{selected:es,active:eZ,open:ec,disabled:ee})),m.createElement(w,{onItemClick:eE,mode:"horizontal"===_?"vertical":_,itemIcon:null!=h?h:W,expandIcon:er},eI)};function eI(e){var n,t=e.eventKey,r=e.children,o=N(t),i=ey(r,o),l=M();return m.useEffect(function(){if(l)return l.registerPath(t,o),function(){l.unregisterPath(t,o)}},[o]),n=l?i:m.createElement(eS,e,i),m.createElement(R.Provider,{value:o},n)}var eK=t(41154),eA=["className","title","eventKey","children"],eO=["children"],eT=function(e){var n=e.className,t=e.title,o=(e.eventKey,e.children),i=(0,a.Z)(e,eA),l=m.useContext(E).prefixCls,u="".concat(l,"-item-group");return m.createElement("li",(0,r.Z)({role:"presentation"},i,{onClick:function(e){return e.stopPropagation()},className:s()(u,n)}),m.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:"string"==typeof t?t:void 0},t),m.createElement("ul",{role:"group",className:"".concat(u,"-list")},o))};function eL(e){var n=e.children,t=(0,a.Z)(e,eO),r=ey(n,N(t.eventKey));return M()?r:m.createElement(eT,(0,et.Z)(t,["warnKey"]),r)}function eD(e){var n=e.className,t=e.style,r=m.useContext(E).prefixCls;return M()?null:m.createElement("li",{role:"separator",className:s()("".concat(r,"-item-divider"),n),style:t})}var e_=["label","children","key","type"],eV=["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"],ez=[],eF=m.forwardRef(function(e,n){var t,c,p,y,g,Z,C,E,M,R,N,S,I,K,J,$,ee,en,et,er,eo,ei,el,eu,ec,es,ef,ed=e.prefixCls,ev=void 0===ed?"rc-menu":ed,em=e.rootClassName,eb=e.style,eh=e.className,eg=e.tabIndex,eZ=e.items,eC=e.children,eE=e.direction,ew=e.id,ek=e.mode,eM=void 0===ek?"vertical":ek,eR=e.inlineCollapsed,eN=e.disabled,ex=e.disabledOverflow,eP=e.subMenuOpenDelay,eS=e.subMenuCloseDelay,eA=e.forceSubMenuRender,eO=e.defaultOpenKeys,eT=e.openKeys,eF=e.activeKey,ej=e.defaultActiveFirst,eB=e.selectable,eW=void 0===eB||eB,eH=e.multiple,eY=void 0!==eH&&eH,eq=e.defaultSelectedKeys,eX=e.selectedKeys,eG=e.onSelect,eQ=e.onDeselect,eU=e.inlineIndent,eJ=e.motion,e$=e.defaultMotions,e0=e.triggerSubMenuAction,e1=e.builtinPlacements,e6=e.itemIcon,e2=e.expandIcon,e5=e.overflowedIndicator,e9=void 0===e5?"...":e5,e3=e.overflowedIndicatorPopupClassName,e4=e.getPopupContainer,e7=e.onClick,e8=e.onOpenChange,ne=e.onKeyDown,nn=(e.openAnimation,e.openTransitionName,e._internalRenderMenuItem),nt=e._internalRenderSubMenuItem,nr=(0,a.Z)(e,eV),no=m.useMemo(function(){var e;return e=eC,eZ&&(e=function e(n){return(n||[]).map(function(n,t){if(n&&"object"===(0,eK.Z)(n)){var o=n.label,i=n.children,l=n.key,u=n.type,c=(0,a.Z)(n,e_),s=null!=l?l:"tmp-".concat(t);return i||"group"===u?"group"===u?m.createElement(eL,(0,r.Z)({key:s},c,{title:o}),e(i)):m.createElement(eI,(0,r.Z)({key:s},c,{title:o}),e(i)):"divider"===u?m.createElement(eD,(0,r.Z)({key:s},c)):m.createElement(ep,(0,r.Z)({key:s},c),o)}return null}).filter(function(e){return e})}(eZ)),ey(e,ez)},[eC,eZ]),ni=m.useState(!1),nl=(0,u.Z)(ni,2),nu=nl[0],na=nl[1],nc=m.useRef(),ns=(t=(0,d.Z)(ew,{value:ew}),p=(c=(0,u.Z)(t,2))[0],y=c[1],m.useEffect(function(){U+=1;var e="".concat(Q,"-").concat(U);y("rc-menu-uuid-".concat(e))},[]),p),nf="rtl"===eE,nd=(0,d.Z)(eO,{value:eT,postState:function(e){return e||ez}}),nv=(0,u.Z)(nd,2),np=nv[0],nm=nv[1],nb=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function t(){nm(e),null==e8||e8(e)}n?(0,b.flushSync)(t):t()},nh=m.useState(np),ny=(0,u.Z)(nh,2),ng=ny[0],nZ=ny[1],nC=m.useRef(!1),nE=m.useMemo(function(){return("inline"===eM||"vertical"===eM)&&eR?["vertical",eR]:[eM,!1]},[eM,eR]),nw=(0,u.Z)(nE,2),nk=nw[0],nM=nw[1],nR="inline"===nk,nN=m.useState(nk),nx=(0,u.Z)(nN,2),nP=nx[0],nS=nx[1],nI=m.useState(nM),nK=(0,u.Z)(nI,2),nA=nK[0],nO=nK[1];m.useEffect(function(){nS(nk),nO(nM),nC.current&&(nR?nm(ng):nb(ez))},[nk,nM]);var nT=m.useState(0),nL=(0,u.Z)(nT,2),nD=nL[0],n_=nL[1],nV=nD>=no.length-1||"horizontal"!==nP||ex;m.useEffect(function(){nR&&nZ(np)},[np]),m.useEffect(function(){return nC.current=!0,function(){nC.current=!1}},[]);var nz=(g=m.useState({}),Z=(0,u.Z)(g,2)[1],C=(0,m.useRef)(new Map),E=(0,m.useRef)(new Map),M=m.useState([]),N=(R=(0,u.Z)(M,2))[0],S=R[1],I=(0,m.useRef)(0),K=(0,m.useRef)(!1),J=function(){K.current||Z({})},$=(0,m.useCallback)(function(e,n){var t,r=q(n);E.current.set(r,e),C.current.set(e,r),I.current+=1;var o=I.current;t=function(){o===I.current&&J()},Promise.resolve().then(t)},[]),ee=(0,m.useCallback)(function(e,n){var t=q(n);E.current.delete(t),C.current.delete(e)},[]),en=(0,m.useCallback)(function(e){S(e)},[]),et=(0,m.useCallback)(function(e,n){var t=(C.current.get(e)||"").split(Y);return n&&N.includes(t[0])&&t.unshift(X),t},[N]),er=(0,m.useCallback)(function(e,n){return e.some(function(e){return et(e,!0).includes(n)})},[et]),eo=(0,m.useCallback)(function(e){var n="".concat(C.current.get(e)).concat(Y),t=new Set;return(0,l.Z)(E.current.keys()).forEach(function(e){e.startsWith(n)&&t.add(E.current.get(e))}),t},[]),m.useEffect(function(){return function(){K.current=!0}},[]),{registerPath:$,unregisterPath:ee,refreshOverflowKeys:en,isSubPathKey:er,getKeyPath:et,getKeys:function(){var e=(0,l.Z)(C.current.keys());return N.length&&e.push(X),e},getSubPathKeys:eo}),nF=nz.registerPath,nj=nz.unregisterPath,nB=nz.refreshOverflowKeys,nW=nz.isSubPathKey,nH=nz.getKeyPath,nY=nz.getKeys,nq=nz.getSubPathKeys,nX=m.useMemo(function(){return{registerPath:nF,unregisterPath:nj}},[nF,nj]),nG=m.useMemo(function(){return{isSubPathKey:nW}},[nW]);m.useEffect(function(){nB(nV?ez:no.slice(nD+1).map(function(e){return e.key}))},[nD,nV]);var nQ=(0,d.Z)(eF||ej&&(null===(es=no[0])||void 0===es?void 0:es.key),{value:eF}),nU=(0,u.Z)(nQ,2),nJ=nU[0],n$=nU[1],n0=G(function(e){n$(e)}),n1=G(function(){n$(void 0)});(0,m.useImperativeHandle)(n,function(){return{list:nc.current,focus:function(e){var n,t,r=H(nY(),ns),o=r.elements,i=r.key2element,l=r.element2key,u=B(nc.current,o),a=null!=nJ?nJ:u[0]?l.get(u[0]):null===(n=no.find(function(e){return!e.props.disabled}))||void 0===n?void 0:n.key,c=i.get(a);a&&c&&(null==c||null===(t=c.focus)||void 0===t||t.call(c,e))}}});var n6=(0,d.Z)(eq||[],{value:eX,postState:function(e){return Array.isArray(e)?e:null==e?ez:[e]}}),n2=(0,u.Z)(n6,2),n5=n2[0],n9=n2[1],n3=function(e){if(eW){var n,t=e.key,r=n5.includes(t);n9(n=eY?r?n5.filter(function(e){return e!==t}):[].concat((0,l.Z)(n5),[t]):[t]);var o=(0,i.Z)((0,i.Z)({},e),{},{selectedKeys:n});r?null==eQ||eQ(o):null==eG||eG(o)}!eY&&np.length&&"inline"!==nP&&nb(ez)},n4=G(function(e){null==e7||e7(ea(e)),n3(e)}),n7=G(function(e,n){var t=np.filter(function(n){return n!==e});if(n)t.push(e);else if("inline"!==nP){var r=nq(e);t=t.filter(function(e){return!r.has(e)})}(0,v.Z)(np,t,!0)||nb(t,!0)}),n8=(ei=function(e,n){var t=null!=n?n:!np.includes(e);n7(e,t)},el=m.useRef(),(eu=m.useRef()).current=nJ,ec=function(){A.Z.cancel(el.current)},m.useEffect(function(){return function(){ec()}},[]),function(e){var n=e.which;if([].concat(j,[_,V,z,F]).includes(n)){var t=nY(),r=H(t,ns),i=r,l=i.elements,u=i.key2element,a=i.element2key,c=function(e,n){for(var t=e||document.activeElement;t;){if(n.has(t))return t;t=t.parentElement}return null}(u.get(nJ),l),s=a.get(c),f=function(e,n,t,r){var i,l,u,a,c="prev",s="next",f="children",d="parent";if("inline"===e&&r===_)return{inlineTrigger:!0};var v=(i={},(0,o.Z)(i,L,c),(0,o.Z)(i,D,s),i),p=(l={},(0,o.Z)(l,O,t?s:c),(0,o.Z)(l,T,t?c:s),(0,o.Z)(l,D,f),(0,o.Z)(l,_,f),l),m=(u={},(0,o.Z)(u,L,c),(0,o.Z)(u,D,s),(0,o.Z)(u,_,f),(0,o.Z)(u,V,d),(0,o.Z)(u,O,t?f:d),(0,o.Z)(u,T,t?d:f),u);switch(null===(a=({inline:v,horizontal:p,vertical:m,inlineSub:v,horizontalSub:m,verticalSub:m})["".concat(e).concat(n?"":"Sub")])||void 0===a?void 0:a[r]){case c:return{offset:-1,sibling:!0};case s:return{offset:1,sibling:!0};case d:return{offset:-1,sibling:!1};case f:return{offset:1,sibling:!1};default:return null}}(nP,1===nH(s,!0).length,nf,n);if(!f&&n!==z&&n!==F)return;(j.includes(n)||[z,F].includes(n))&&e.preventDefault();var d=function(e){if(e){var n=e,t=e.querySelector("a");null!=t&&t.getAttribute("href")&&(n=t);var r=a.get(e);n$(r),ec(),el.current=(0,A.Z)(function(){eu.current===r&&n.focus()})}};if([z,F].includes(n)||f.sibling||!c){var v,p=B(v=c&&"inline"!==nP?function(e){for(var n=e;n;){if(n.getAttribute("data-menu-list"))return n;n=n.parentElement}return null}(c):nc.current,l);d(n===z?p[0]:n===F?p[p.length-1]:W(v,l,c,f.offset))}else if(f.inlineTrigger)ei(s);else if(f.offset>0)ei(s,!0),ec(),el.current=(0,A.Z)(function(){r=H(t,ns);var e=c.getAttribute("aria-controls");d(W(document.getElementById(e),r.elements))},5);else if(f.offset<0){var m=nH(s,!0),b=m[m.length-2],h=u.get(b);ei(b,!1),d(h)}}null==ne||ne(e)});m.useEffect(function(){na(!0)},[]);var te=m.useMemo(function(){return{_internalRenderMenuItem:nn,_internalRenderSubMenuItem:nt}},[nn,nt]),tn="horizontal"!==nP||ex?no:no.map(function(e,n){return m.createElement(w,{key:e.key,overflowDisabled:n>nD},e)}),tt=m.createElement(f.Z,(0,r.Z)({id:ew,ref:nc,prefixCls:"".concat(ev,"-overflow"),component:"ul",itemComponent:ep,className:s()(ev,"".concat(ev,"-root"),"".concat(ev,"-").concat(nP),eh,(ef={},(0,o.Z)(ef,"".concat(ev,"-inline-collapsed"),nA),(0,o.Z)(ef,"".concat(ev,"-rtl"),nf),ef),em),dir:eE,style:eb,role:"menu",tabIndex:void 0===eg?0:eg,data:tn,renderRawItem:function(e){return e},renderRawRest:function(e){var n=e.length,t=n?no.slice(-n):null;return m.createElement(eI,{eventKey:X,title:e9,disabled:nV,internalPopupClose:0===n,popupClassName:e3},t)},maxCount:"horizontal"!==nP||ex?f.Z.INVALIDATE:f.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(e){n_(e)},onKeyDown:n8},nr));return m.createElement(P.Provider,{value:te},m.createElement(h.Provider,{value:ns},m.createElement(w,{prefixCls:ev,rootClassName:em,mode:nP,openKeys:np,rtl:nf,disabled:eN,motion:nu?eJ:null,defaultMotions:nu?e$:null,activeKey:nJ,onActive:n0,onInactive:n1,selectedKeys:n5,inlineIndent:void 0===eU?24:eU,subMenuOpenDelay:void 0===eP?.1:eP,subMenuCloseDelay:void 0===eS?.1:eS,forceSubMenuRender:eA,builtinPlacements:e1,triggerSubMenuAction:void 0===e0?"hover":e0,getPopupContainer:e4,itemIcon:e6,expandIcon:e2,onItemClick:n4,onOpenChange:n7},m.createElement(x.Provider,{value:nG},tt),m.createElement("div",{style:{display:"none"},"aria-hidden":!0},m.createElement(k.Provider,{value:nX},no)))))});eF.Item=ep,eF.SubMenu=eI,eF.ItemGroup=eL,eF.Divider=eD;var ej=eF}}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/1598-7d5ae4a38946f5f0.js b/ui/litellm-dashboard/out/_next/static/chunks/1598-fd263f5bc605a4ff.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/1598-7d5ae4a38946f5f0.js rename to ui/litellm-dashboard/out/_next/static/chunks/1598-fd263f5bc605a4ff.js index cd0db7e188f..50752d9c165 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/1598-7d5ae4a38946f5f0.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/1598-fd263f5bc605a4ff.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1598],{16312:function(e,l,t){t.d(l,{z:function(){return s.Z}});var s=t(20831)},58643:function(e,l,t){t.d(l,{OK:function(){return s.Z},nP:function(){return i.Z},td:function(){return r.Z},v0:function(){return a.Z},x4:function(){return o.Z}});var s=t(12485),a=t(18135),r=t(35242),o=t(29706),i=t(77991)},81598:function(e,l,t){t.d(l,{Z:function(){return lR}});var s=t(57437),a=t(2265),r=t(49804),o=t(67101),i=t(84264),n=t(19250),d=t(42673),c=t(9114);let m=async(e,l,t)=>{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 t=e.custom_llm_provider,s=d.fK[t]+"/*";e.model_name=s,l.push({public_name:s,litellm_model:s}),e.model=s}let t=[];for(let s of l){let l={},a={},r=s.public_name;for(let[t,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"!==t&&"pricing_model"!==t&&"cache_control"!==t){if("model_name"==t)l.model=r;else if("custom_llm_provider"==t){console.log("custom_llm_provider:",r);let e=d.fK[r];l.custom_llm_provider=e,console.log("custom_llm_provider mappingResult:",e)}else if("model"==t)continue;else if("base_model"===t)a[t]=r;else if("team_id"===t)a.team_id=r;else if("model_access_group"===t)a.access_groups=r;else if("mode"==t)console.log("placing mode in modelInfo"),a.mode=r,delete l.mode;else if("custom_model_name"===t)l.model=r;else if("litellm_extra_params"==t){console.log("litellm_extra_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r)}catch(e){throw c.Z.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[t,s]of Object.entries(e))l[t]=s}}else if("model_info_params"==t){console.log("model_info_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r)}catch(e){throw c.Z.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[l,t]of Object.entries(e))a[l]=t}}else if("input_cost_per_token"===t||"output_cost_per_token"===t||"input_cost_per_second"===t){r&&(l[t]=Number(r));continue}else l[t]=r}t.push({litellmParamsObj:l,modelInfoObj:a,modelName:r})}return t}catch(e){c.Z.fromBackend("Failed to create model: "+e)}},u=async(e,l,t,s)=>{try{let a=await m(e,l,t);if(!a||0===a.length)return;for(let e of a){let{litellmParamsObj:t,modelInfoObj:s,modelName:a}=e,r={model_name:a,litellm_params:t,model_info:s},o=await (0,n.modelCreateCall)(l,r);console.log("response for model create call: ".concat(o.data))}s&&s(),t.resetFields()}catch(e){c.Z.fromBackend("Failed to add model: "+e)}};var h=t(62490),p=t(53410),x=t(74998),g=t(93192),f=t(13634),j=t(82680),v=t(52787),_=t(89970),y=t(73002),b=t(56522),N=t(65319),w=t(47451),k=t(69410),Z=t(3632);let{Link:C}=g.default,S={[d.Cl.OpenAI]:[{key:"api_base",label:"API Base",type:"text",placeholder:"https://api.openai.com/v1",tooltip:"Common endpoints: https://api.openai.com/v1, https://eu.api.openai.com, https://us.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}],[d.Cl.OpenAI_Text]:[{key:"api_base",label:"API Base",type:"text",placeholder:"https://api.openai.com/v1",tooltip:"Common endpoints: https://api.openai.com/v1, https://eu.api.openai.com, https://us.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}],[d.Cl.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"}],[d.Cl.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}],[d.Cl.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}],[d.Cl.Azure_AI_Studio]:[{key:"api_base",label:"API Base",placeholder:"https://.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}],[d.Cl.OpenAI_Compatible]:[{key:"api_base",label:"API Base",placeholder:"https://...",required:!0},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[d.Cl.Dashscope]:[{key:"api_key",label:"Dashscope API Key",type:"password",required:!0},{key:"api_base",label:"API Base",placeholder:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",defaultValue:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",required:!0,tooltip:"The base URL for your Dashscope server. Defaults to https://dashscope-intl.aliyuncs.com/compatible-mode/v1 if not specified."}],[d.Cl.OpenAI_Text_Compatible]:[{key:"api_base",label:"API Base",placeholder:"https://...",required:!0},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[d.Cl.Bedrock]:[{key:"aws_access_key_id",label:"AWS Access Key ID",type:"password",required:!1,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",type:"password",required:!1,tooltip:"You can provide the raw key or the environment variable (e.g. `os.environ/MY_SECRET_KEY`)."},{key:"aws_session_token",label:"AWS Session Token",type:"password",required:!1,tooltip:"Temporary credentials session token. You can provide the raw token or the environment variable (e.g. `os.environ/MY_SESSION_TOKEN`)."},{key:"aws_region_name",label:"AWS Region Name",placeholder:"us-east-1",required:!1,tooltip:"You can provide the raw key or the environment variable (e.g. `os.environ/MY_SECRET_KEY`)."},{key:"aws_session_name",label:"AWS Session Name",placeholder:"my-session",required:!1,tooltip:"Name for the AWS session. You can provide the raw value or the environment variable (e.g. `os.environ/MY_SESSION_NAME`)."},{key:"aws_profile_name",label:"AWS Profile Name",placeholder:"default",required:!1,tooltip:"AWS profile name to use for authentication. You can provide the raw value or the environment variable (e.g. `os.environ/MY_PROFILE_NAME`)."},{key:"aws_role_name",label:"AWS Role Name",placeholder:"MyRole",required:!1,tooltip:"AWS IAM role name to assume. You can provide the raw value or the environment variable (e.g. `os.environ/MY_ROLE_NAME`)."},{key:"aws_web_identity_token",label:"AWS Web Identity Token",type:"password",required:!1,tooltip:"Web identity token for OIDC authentication. You can provide the raw token or the environment variable (e.g. `os.environ/MY_WEB_IDENTITY_TOKEN`)."},{key:"aws_bedrock_runtime_endpoint",label:"AWS Bedrock Runtime Endpoint",placeholder:"https://bedrock-runtime.us-east-1.amazonaws.com",required:!1,tooltip:"Custom Bedrock runtime endpoint URL. You can provide the raw value or the environment variable (e.g. `os.environ/MY_BEDROCK_ENDPOINT`)."}],[d.Cl.SageMaker]:[{key:"aws_access_key_id",label:"AWS Access Key ID",type:"password",required:!1,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",type:"password",required:!1,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:!1,tooltip:"You can provide the raw key or the environment variable (e.g. `os.environ/MY_SECRET_KEY`)."}],[d.Cl.Ollama]:[{key:"api_base",label:"API Base",placeholder:"http://localhost:11434",defaultValue:"http://localhost:11434",required:!1,tooltip:"The base URL for your Ollama server. Defaults to http://localhost:11434 if not specified."}],[d.Cl.Anthropic]:[{key:"api_key",label:"API Key",placeholder:"sk-",type:"password",required:!0}],[d.Cl.Deepgram]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.ElevenLabs]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Google_AI_Studio]:[{key:"api_key",label:"API Key",placeholder:"aig-",type:"password",required:!0}],[d.Cl.Groq]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.MistralAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Deepseek]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Cohere]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Databricks]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.xAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.AIML]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Cerebras]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Sambanova]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Perplexity]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.TogetherAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Openrouter]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.FireworksAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.GradientAI]:[{key:"api_base",label:"GradientAI Endpoint",placeholder:"https://...",required:!1},{key:"api_key",label:"GradientAI API Key",type:"password",required:!0}],[d.Cl.Triton]:[{key:"api_key",label:"API Key",type:"password",required:!1},{key:"api_base",label:"API Base",placeholder:"http://localhost:8000/generate",required:!1}],[d.Cl.Hosted_Vllm]:[{key:"api_base",label:"API Base",placeholder:"https://...",required:!0},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[d.Cl.Voyage]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.JinaAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.VolcEngine]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.DeepInfra]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Oracle]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Snowflake]:[{key:"api_key",label:"Snowflake API Key / JWT Key for Authentication",type:"password",required:!0},{key:"api_base",label:"Snowflake API Endpoint",placeholder:"https://1234567890.snowflakecomputing.com/api/v2/cortex/inference:complete",tooltip:"Enter the full endpoint with path here. Example: https://1234567890.snowflakecomputing.com/api/v2/cortex/inference:complete",required:!0}],[d.Cl.Infinity]:[{key:"api_base",label:"API Base",placeholder:"http://localhost:7997"}],[d.Cl.FalAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}]};var A=e=>{let{selectedProvider:l,uploadProps:t}=e,r=d.Cl[l],o=f.Z.useFormInstance(),i=a.useMemo(()=>S[r]||[],[r]),n={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;console.log("Setting field value from JSON, length: ".concat(l.length)),o.setFieldsValue({vertex_credentials:l}),console.log("Form values after setting:",o.getFieldsValue())}},l.readAsText(e)}return!1},onChange(e){console.log("Upload onChange triggered in ProviderSpecificFields"),console.log("Current form values:",o.getFieldsValue()),"uploading"!==e.file.status&&console.log(e.file,e.fileList)}};return(0,s.jsx)(s.Fragment,{children:i.map(e=>{var l;return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(f.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,s.jsx)(v.default,{placeholder:e.placeholder,defaultValue:e.defaultValue,children:null===(l=e.options)||void 0===l?void 0:l.map(e=>(0,s.jsx)(v.default.Option,{value:e,children:e},e))}):"upload"===e.type?(0,s.jsx)(N.default,{...n,onChange:l=>{(null==t?void 0:t.onChange)&&t.onChange(l),setTimeout(()=>{let l=o.getFieldValue(e.key);console.log("".concat(e.key," value after upload:"),JSON.stringify(l))},500)},children:(0,s.jsx)(y.ZP,{icon:(0,s.jsx)(Z.Z,{}),children:"Click to Upload"})}):(0,s.jsx)(b.o,{placeholder:e.placeholder,type:"password"===e.type?"password":"text",defaultValue:e.defaultValue})}),"vertex_credentials"===e.key&&(0,s.jsx)(w.Z,{children:(0,s.jsx)(k.Z,{children:(0,s.jsx)(b.x,{className:"mb-3 mt-1",children:"Give a gcp service account(.json file)"})})}),"base_model"===e.key&&(0,s.jsxs)(w.Z,{children:[(0,s.jsx)(k.Z,{span:10}),(0,s.jsx)(k.Z,{span:10,children:(0,s.jsxs)(b.x,{className:"mb-2",children:["The actual model your azure deployment uses. Used for accurate cost tracking. Select name from"," ",(0,s.jsx)(C,{href:"https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json",target:"_blank",children:"here"})]})})]})]},e.key)})})},I=t(31283);let{Title:E,Link:P}=g.default;var M=e=>{let{isVisible:l,onCancel:t,onAddCredential:r,onUpdateCredential:o,uploadProps:i,addOrEdit:n,existingCredential:c}=e,[m]=f.Z.useForm(),[u,h]=(0,a.useState)(d.Cl.OpenAI),[p,x]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{c&&(m.setFieldsValue({credential_name:c.credential_name,custom_llm_provider:c.credential_info.custom_llm_provider,api_base:c.credential_values.api_base,api_version:c.credential_values.api_version,base_model:c.credential_values.base_model,api_key:c.credential_values.api_key}),h(c.credential_info.custom_llm_provider))},[c]),(0,s.jsx)(j.Z,{title:"add"===n?"Add New Credential":"Edit Credential",visible:l,onCancel:()=>{t(),m.resetFields()},footer:null,width:600,children:(0,s.jsxs)(f.Z,{form:m,onFinish:e=>{let l=Object.entries(e).reduce((e,l)=>{let[t,s]=l;return""!==s&&null!=s&&(e[t]=s),e},{});"add"===n?r(l):o(l),m.resetFields()},layout:"vertical",children:[(0,s.jsx)(f.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,s.jsx)(I.o,{placeholder:"Enter a friendly name for these credentials",disabled:null!=c&&!!c.credential_name})}),(0,s.jsx)(f.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,s.jsx)(v.default,{showSearch:!0,onChange:e=>{h(e),m.setFieldValue("custom_llm_provider",e)},children:Object.entries(d.Cl).map(e=>{let[l,t]=e;return(0,s.jsx)(v.default.Option,{value:l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("img",{src:d.cd[t],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,s=l.parentElement;if(s){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=t.charAt(0),s.replaceChild(e,l)}}}),(0,s.jsx)("span",{children:t})]})},l)})})}),(0,s.jsx)(A,{selectedProvider:u,uploadProps:i}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(_.Z,{title:"Get help on our github",children:(0,s.jsx)(P,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(y.ZP,{onClick:()=>{t(),m.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(y.ZP,{htmlType:"submit",children:"add"===n?"Add Credential":"Update Credential"})]})]})]})})},F=t(16312),L=t(88532),T=e=>{let{isVisible:l,onCancel:t,onConfirm:r,credentialName:o}=e,[i,n]=(0,a.useState)(""),d=i===o,c=()=>{n(""),t()};return(0,s.jsx)(j.Z,{title:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(L.Z,{className:"h-6 w-6 text-red-600 mr-2"}),"Delete Credential"]}),open:l,footer:null,onCancel:c,closable:!0,destroyOnClose:!0,maskClosable:!1,children:(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,s.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,s.jsx)(L.Z,{className:"h-5 w-5"})}),(0,s.jsx)("div",{children:(0,s.jsx)("p",{className:"text-base font-medium text-red-600",children:"This action cannot be undone and may break existing integrations."})})]}),(0,s.jsxs)("div",{className:"mb-5",children:[(0,s.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,s.jsxs)("span",{className:"underline italic",children:["'",o,"'"]})," to confirm deletion:"]}),(0,s.jsx)("input",{type:"text",value:i,onChange:e=>n(e.target.value),placeholder:"Enter credential name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]}),(0,s.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,s.jsx)(F.z,{onClick:c,variant:"secondary",className:"mr-2",children:"Cancel"}),(0,s.jsx)(F.z,{onClick:()=>{d&&(n(""),r())},color:"red",className:"focus:ring-red-500",disabled:!d,children:"Delete Credential"})]})]})})},R=e=>{let{accessToken:l,uploadProps:t,credentialList:r,fetchCredentials:o}=e,[i,d]=(0,a.useState)(!1),[m,u]=(0,a.useState)(!1),[g,j]=(0,a.useState)(null),[v,_]=(0,a.useState)(null),[y]=f.Z.useForm(),b=["credential_name","custom_llm_provider"],N=async e=>{if(!l)return;let t=Object.entries(e).filter(e=>{let[l]=e;return!b.includes(l)}).reduce((e,l)=>{let[t,s]=l;return{...e,[t]:s}},{}),s={credential_name:e.credential_name,credential_values:t,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,n.credentialUpdateCall)(l,e.credential_name,s),c.Z.success("Credential updated successfully"),u(!1),o(l)},w=async e=>{if(!l)return;let t=Object.entries(e).filter(e=>{let[l]=e;return!b.includes(l)}).reduce((e,l)=>{let[t,s]=l;return{...e,[t]:s}},{}),s={credential_name:e.credential_name,credential_values:t,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,n.credentialCreateCall)(l,s),c.Z.success("Credential added successfully"),d(!1),o(l)};(0,a.useEffect)(()=>{l&&o(l)},[l]);let k=e=>{let l={openai:"blue",azure:"indigo",anthropic:"purple",default:"gray"},t=l[e.toLowerCase()]||l.default;return(0,s.jsx)(h.Ct,{color:t,size:"xs",children:e})},Z=async e=>{l&&(await (0,n.credentialDeleteCall)(l,e),c.Z.success("Credential deleted successfully"),_(null),o(l))},C=e=>{_(e)};return(0,s.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,s.jsx)(h.xv,{children:"Configured credentials for different AI providers. Add and manage your API credentials."})}),(0,s.jsx)(h.Zb,{children:(0,s.jsxs)(h.iA,{children:[(0,s.jsx)(h.ss,{children:(0,s.jsxs)(h.SC,{children:[(0,s.jsx)(h.xs,{children:"Credential Name"}),(0,s.jsx)(h.xs,{children:"Provider"}),(0,s.jsx)(h.xs,{children:"Description"})]})}),(0,s.jsx)(h.RM,{children:r&&0!==r.length?r.map((e,l)=>{var t,a;return(0,s.jsxs)(h.SC,{children:[(0,s.jsx)(h.pj,{children:e.credential_name}),(0,s.jsx)(h.pj,{children:k((null===(t=e.credential_info)||void 0===t?void 0:t.custom_llm_provider)||"-")}),(0,s.jsx)(h.pj,{children:(null===(a=e.credential_info)||void 0===a?void 0:a.description)||"-"}),(0,s.jsxs)(h.pj,{children:[(0,s.jsx)(h.zx,{icon:p.Z,variant:"light",size:"sm",onClick:()=>{j(e),u(!0)}}),(0,s.jsx)(h.zx,{icon:x.Z,variant:"light",size:"sm",onClick:()=>C(e.credential_name)})]})]},l)}):(0,s.jsx)(h.SC,{children:(0,s.jsx)(h.pj,{colSpan:4,className:"text-center py-4 text-gray-500",children:"No credentials configured"})})})]})}),(0,s.jsx)(h.zx,{onClick:()=>d(!0),className:"mt-4",children:"Add Credential"}),i&&(0,s.jsx)(M,{onAddCredential:w,isVisible:i,onCancel:()=>d(!1),uploadProps:t,addOrEdit:"add",onUpdateCredential:N,existingCredential:null}),m&&(0,s.jsx)(M,{onAddCredential:w,isVisible:m,existingCredential:g,onUpdateCredential:N,uploadProps:t,onCancel:()=>u(!1),addOrEdit:"edit"}),v&&(0,s.jsx)(T,{isVisible:!0,onCancel:()=>{_(null)},onConfirm:()=>Z(v),credentialName:v})]})};let O=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)||"-"};var V=t(47323),D=t(12485),q=t(18135),z=t(35242),B=t(29706),K=t(77991),U=t(23628),G=t(33293),H=t(20831),W=t(12514),Y=t(49566),J=t(96761),$=t(24199),Q=t(10900),X=t(45589),ee=t(64482),el=t(15424);let{Title:et,Link:es}=g.default;var ea=e=>{let{isVisible:l,onCancel:t,onAddCredential:a,existingCredential:r,setIsCredentialModalOpen:o}=e,[i]=f.Z.useForm();return console.log("existingCredential in add credentials tab: ".concat(JSON.stringify(r))),(0,s.jsx)(j.Z,{title:"Reuse Credentials",visible:l,onCancel:()=>{t(),i.resetFields()},footer:null,width:600,children:(0,s.jsxs)(f.Z,{form:i,onFinish:e=>{a(e),i.resetFields(),o(!1)},layout:"vertical",children:[(0,s.jsx)(f.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:null==r?void 0:r.credential_name,children:(0,s.jsx)(I.o,{placeholder:"Enter a friendly name for these credentials"})}),Object.entries((null==r?void 0:r.credential_values)||{}).map(e=>{let[l,t]=e;return(0,s.jsx)(f.Z.Item,{label:l,name:l,initialValue:t,children:(0,s.jsx)(I.o,{placeholder:"Enter ".concat(l),disabled:!0})},l)}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(_.Z,{title:"Get help on our github",children:(0,s.jsx)(es,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(y.ZP,{onClick:()=>{t(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(y.ZP,{htmlType:"submit",children:"Reuse Credentials"})]})]})]})})},er=t(63709),eo=t(45246),ei=t(96473);let{Text:en}=g.default;var ed=e=>{let{form:l,showCacheControl:t,onCacheControlChange:a}=e,r=e=>{let t=l.getFieldValue("litellm_extra_params");try{let s=t?JSON.parse(t):{};e.length>0?s.cache_control_injection_points=e:delete s.cache_control_injection_points,Object.keys(s).length>0?l.setFieldValue("litellm_extra_params",JSON.stringify(s,null,2)):l.setFieldValue("litellm_extra_params","")}catch(e){console.error("Error updating cache control points:",e)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Z.Item,{label:"Cache Control Injection Points",name:"cache_control",valuePropName:"checked",className:"mb-4",tooltip:"Tell litellm where to inject cache control checkpoints. You can specify either by role (to apply to all messages of that role) or by specific message index.",children:(0,s.jsx)(er.Z,{onChange:a,className:"bg-gray-600"})}),t&&(0,s.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,s.jsx)(en,{className:"text-sm text-gray-500 block mb-4",children:"Providers like Anthropic, Bedrock API require users to specify where to inject cache control checkpoints, litellm can automatically add them for you as a cost saving feature."}),(0,s.jsx)(f.Z.List,{name:"cache_control_injection_points",initialValue:[{location:"message"}],children:(e,t)=>{let{add:a,remove:o}=t;return(0,s.jsxs)(s.Fragment,{children:[e.map((t,a)=>(0,s.jsxs)("div",{className:"flex items-center mb-4 gap-4",children:[(0,s.jsx)(f.Z.Item,{...t,label:"Type",name:[t.name,"location"],initialValue:"message",className:"mb-0",style:{width:"180px"},children:(0,s.jsx)(v.default,{disabled:!0,options:[{value:"message",label:"Message"}]})}),(0,s.jsx)(f.Z.Item,{...t,label:"Role",name:[t.name,"role"],className:"mb-0",style:{width:"180px"},tooltip:"LiteLLM will mark all messages of this role as cacheable",children:(0,s.jsx)(v.default,{placeholder:"Select a role",allowClear:!0,options:[{value:"user",label:"User"},{value:"system",label:"System"},{value:"assistant",label:"Assistant"}],onChange:()=>{r(l.getFieldValue("cache_control_points"))}})}),(0,s.jsx)(f.Z.Item,{...t,label:"Index",name:[t.name,"index"],className:"mb-0",style:{width:"180px"},tooltip:"(Optional) If set litellm will mark the message at this index as cacheable",children:(0,s.jsx)($.Z,{type:"number",placeholder:"Optional",step:1,min:0,onChange:()=>{r(l.getFieldValue("cache_control_points"))}})}),e.length>1&&(0,s.jsx)(eo.Z,{className:"text-red-500 cursor-pointer text-lg ml-12",onClick:()=>{o(t.name),setTimeout(()=>{r(l.getFieldValue("cache_control_points"))},0)}})]},t.key)),(0,s.jsx)(f.Z.Item,{children:(0,s.jsxs)("button",{type:"button",className:"flex items-center justify-center w-full border border-dashed border-gray-300 py-2 px-4 text-gray-600 hover:text-blue-600 hover:border-blue-300 transition-all rounded",onClick:()=>a(),children:[(0,s.jsx)(ei.Z,{className:"mr-2"}),"Add Injection Point"]})})]})}})]})]})},ec=t(30401),em=t(78867),eu=t(59872),eh=t(51601),ep=t(44851),ex=t(67960),eg=t(20577),ef=t(70464),ej=t(26349),ev=t(92280);let{TextArea:e_}=ee.default,{Panel:ey}=ep.default;var eb=e=>{let{modelInfo:l,value:t,onChange:r}=e,[o,i]=(0,a.useState)([]),[n,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)([]);(0,a.useEffect)(()=>{if(null==t?void 0:t.routes){let e=t.routes.map((e,l)=>({id:e.id||"route-".concat(l,"-").concat(Date.now()),model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold||.5}));i(e),m(e.map(e=>e.id))}else i([]),m([])},[t]);let u=e=>{let l=o.filter(l=>l.id!==e);i(l),p(l),m(l=>l.filter(l=>l!==e))},h=(e,l,t)=>{let s=o.map(s=>s.id===e?{...s,[l]:t}:s);i(s),p(s)},p=e=>{let l={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};null==r||r(l)},x=l.map(e=>({value:e.model_group,label:e.model_group}));return(0,s.jsxs)("div",{className:"w-full max-w-none",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6 w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(ev.x,{className:"text-lg font-semibold",children:"Routes Configuration"}),(0,s.jsx)(_.Z,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,s.jsx)(el.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(y.ZP,{type:"primary",icon:(0,s.jsx)(ei.Z,{}),onClick:()=>{let e="route-".concat(Date.now()),l=[...o,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];i(l),p(l),m(l=>[...l,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===o.length?(0,s.jsx)("div",{className:"text-center py-12 text-gray-500 bg-gray-50 rounded-lg border-2 border-dashed border-gray-200 mb-6",children:(0,s.jsx)(ev.x,{children:"No routes configured. Click “Add Route” to get started."})}):(0,s.jsx)("div",{className:"space-y-3 mb-6 w-full",children:o.map((e,l)=>(0,s.jsx)(ex.Z,{className:"border border-gray-200 shadow-sm w-full",bodyStyle:{padding:0},children:(0,s.jsx)(ep.default,{ghost:!0,expandIcon:e=>{let{isActive:l}=e;return(0,s.jsx)(ef.Z,{rotate:l?180:0})},activeKey:c,onChange:e=>m(Array.isArray(e)?e:[e].filter(Boolean)),items:[{key:e.id,label:(0,s.jsxs)("div",{className:"flex justify-between items-center py-2",children:[(0,s.jsxs)(ev.x,{className:"font-medium text-base",children:["Route ",l+1,": ",e.model||"Unnamed"]}),(0,s.jsx)(y.ZP,{type:"text",danger:!0,icon:(0,s.jsx)(ej.Z,{}),onClick:l=>{l.stopPropagation(),u(e.id)},className:"mr-2"})]}),children:(0,s.jsxs)("div",{className:"px-6 pb-6 w-full",children:[(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsx)(ev.x,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,s.jsx)(v.default,{value:e.model,onChange:l=>h(e.id,"model",l),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:x})]}),(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsx)(ev.x,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,s.jsx)(e_,{value:e.description,onChange:l=>h(e.id,"description",l.target.value),placeholder:"Describe when this route should be used...",rows:2,style:{width:"100%"}})]}),(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(ev.x,{className:"text-sm font-medium",children:"Score Threshold"}),(0,s.jsx)(_.Z,{title:"Minimum similarity score to route to this model (0-1)",children:(0,s.jsx)(el.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(eg.Z,{value:e.score_threshold,onChange:l=>h(e.id,"score_threshold",l||0),min:0,max:1,step:.1,style:{width:"100%"},placeholder:"0.5"})]}),(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(ev.x,{className:"text-sm font-medium",children:"Example Utterances"}),(0,s.jsx)(_.Z,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,s.jsx)(el.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(ev.x,{className:"text-xs text-gray-500 mb-2",children:"Type an utterance and press Enter to add it. You can also paste multiple lines."}),(0,s.jsx)(v.default,{mode:"tags",value:e.utterances,onChange:l=>h(e.id,"utterances",l),placeholder:"Type an utterance and press Enter...",style:{width:"100%"},tokenSeparators:["\n"],maxTagCount:"responsive",allowClear:!0})]})]})}]})},e.id))}),(0,s.jsxs)("div",{className:"border-t pt-6 w-full",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,s.jsx)(ev.x,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,s.jsx)(y.ZP,{type:"link",onClick:()=>d(!n),className:"text-blue-600 p-0",children:n?"Hide":"Show"})]}),n&&(0,s.jsx)(ex.Z,{className:"bg-gray-50 w-full",children:(0,s.jsx)("pre",{className:"text-sm overflow-auto max-h-64 w-full",children:JSON.stringify({routes:o.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})]})},eN=e=>{let{isVisible:l,onCancel:t,onSuccess:r,modelData:o,accessToken:i,userRole:d}=e,[m]=f.Z.useForm(),[u,h]=(0,a.useState)(!1),[p,x]=(0,a.useState)([]),[g,_]=(0,a.useState)([]),[N,w]=(0,a.useState)(!1),[k,Z]=(0,a.useState)(!1),[C,S]=(0,a.useState)(null);(0,a.useEffect)(()=>{l&&o&&A()},[l,o]),(0,a.useEffect)(()=>{let e=async()=>{if(i)try{let e=await (0,n.modelAvailableCall)(i,"","",!1,null,!0,!0);x(e.data.map(e=>e.id))}catch(e){console.error("Error fetching model access groups:",e)}},t=async()=>{if(i)try{let e=await (0,eh.p)(i);_(e)}catch(e){console.error("Error fetching model info:",e)}};l&&(e(),t())},[l,i]);let A=()=>{try{var e,l,t,s,a,r;let i=null;(null===(e=o.litellm_params)||void 0===e?void 0:e.auto_router_config)&&(i="string"==typeof o.litellm_params.auto_router_config?JSON.parse(o.litellm_params.auto_router_config):o.litellm_params.auto_router_config),S(i),m.setFieldsValue({auto_router_name:o.model_name,auto_router_default_model:(null===(l=o.litellm_params)||void 0===l?void 0:l.auto_router_default_model)||"",auto_router_embedding_model:(null===(t=o.litellm_params)||void 0===t?void 0:t.auto_router_embedding_model)||"",model_access_group:(null===(s=o.model_info)||void 0===s?void 0:s.access_groups)||[]});let n=new Set(g.map(e=>e.model_group));w(!n.has(null===(a=o.litellm_params)||void 0===a?void 0:a.auto_router_default_model)),Z(!n.has(null===(r=o.litellm_params)||void 0===r?void 0:r.auto_router_embedding_model))}catch(e){console.error("Error parsing auto router config:",e),c.Z.fromBackend("Error loading auto router configuration")}},I=async()=>{try{h(!0);let e=await m.validateFields(),l={...o.litellm_params,auto_router_config:JSON.stringify(C),auto_router_default_model:e.auto_router_default_model,auto_router_embedding_model:e.auto_router_embedding_model||void 0},s={...o.model_info,access_groups:e.model_access_group||[]},a={model_name:e.auto_router_name,litellm_params:l,model_info:s};await (0,n.modelPatchUpdateCall)(i,a,o.model_info.id);let d={...o,model_name:e.auto_router_name,litellm_params:l,model_info:s};c.Z.success("Auto router configuration updated successfully"),r(d),t()}catch(e){console.error("Error updating auto router:",e),c.Z.fromBackend("Failed to update auto router configuration")}finally{h(!1)}},E=g.map(e=>({value:e.model_group,label:e.model_group}));return(0,s.jsx)(j.Z,{title:"Edit Auto Router Configuration",open:l,onCancel:t,footer:[(0,s.jsx)(y.ZP,{onClick:t,children:"Cancel"},"cancel"),(0,s.jsx)(y.ZP,{loading:u,onClick:I,children:"Save Changes"},"submit")],width:1e3,destroyOnClose:!0,children:(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(b.x,{className:"text-gray-600",children:"Edit the auto router configuration including routing logic, default models, and access settings."}),(0,s.jsxs)(f.Z,{form:m,layout:"vertical",className:"space-y-4",children:[(0,s.jsx)(f.Z.Item,{label:"Auto Router Name",name:"auto_router_name",rules:[{required:!0,message:"Auto router name is required"}],children:(0,s.jsx)(b.o,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(eb,{modelInfo:g,value:C,onChange:e=>{S(e)}})}),(0,s.jsx)(f.Z.Item,{label:"Default Model",name:"auto_router_default_model",rules:[{required:!0,message:"Default model is required"}],children:(0,s.jsx)(v.default,{placeholder:"Select a default model",onChange:e=>{w("custom"===e)},options:[...E,{value:"custom",label:"Enter custom model name"}],showSearch:!0})}),(0,s.jsx)(f.Z.Item,{label:"Embedding Model",name:"auto_router_embedding_model",children:(0,s.jsx)(v.default,{placeholder:"Select an embedding model (optional)",onChange:e=>{Z("custom"===e)},options:[...E,{value:"custom",label:"Enter custom model name"}],showSearch:!0,allowClear:!0})}),"Admin"===d&&(0,s.jsx)(f.Z.Item,{label:"Model Access Groups",name:"model_access_group",tooltip:"Control who can access this auto router",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:p.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})]})]})})};function ew(e){var l,t,r,m,u,h,p,g,b,N,w,k,Z,C,S,A,I,E,P,M,F,L,T,R,V,U,G,et,es,er,eo,ei;let{modelId:en,onClose:eh,modelData:ep,accessToken:ex,userID:eg,userRole:ef,editModel:ej,setEditModalVisible:ev,setSelectedModel:e_,onModelUpdate:ey,modelAccessGroups:eb}=e,[ew]=f.Z.useForm(),[ek,eZ]=(0,a.useState)(null),[eC,eS]=(0,a.useState)(!1),[eA,eI]=(0,a.useState)(!1),[eE,eP]=(0,a.useState)(!1),[eM,eF]=(0,a.useState)(!1),[eL,eT]=(0,a.useState)(!1),[eR,eO]=(0,a.useState)(null),[eV,eD]=(0,a.useState)(!1),[eq,ez]=(0,a.useState)({}),[eB,eK]=(0,a.useState)(!1),[eU,eG]=(0,a.useState)([]),[eH,eW]=(0,a.useState)({}),eY=("Admin"===ef||(null==ep?void 0:null===(l=ep.model_info)||void 0===l?void 0:l.created_by)===eg)&&(null==ep?void 0:null===(t=ep.model_info)||void 0===t?void 0:t.db_model),eJ=(null==ep?void 0:null===(r=ep.litellm_params)||void 0===r?void 0:r.auto_router_config)!=null,e$=(null==ep?void 0:null===(m=ep.litellm_params)||void 0===m?void 0:m.litellm_credential_name)!=null&&(null==ep?void 0:null===(u=ep.litellm_params)||void 0===u?void 0:u.litellm_credential_name)!=void 0;console.log("usingExistingCredential, ",e$),console.log("modelData.litellm_params.litellm_credential_name, ",null==ep?void 0:null===(h=ep.litellm_params)||void 0===h?void 0:h.litellm_credential_name),console.log("tagsList, ",null===(p=ep.litellm_params)||void 0===p?void 0:p.tags),(0,a.useEffect)(()=>{let e=async()=>{var e,l,t,s,a,r,o;if(!ex)return;let i=await (0,n.modelInfoV1Call)(ex,en);console.log("modelInfoResponse, ",i);let d=i.data[0];d&&!d.litellm_model_name&&(d={...d,litellm_model_name:null!==(o=null!==(r=null!==(a=null==d?void 0:null===(l=d.litellm_params)||void 0===l?void 0:l.litellm_model_name)&&void 0!==a?a:null==d?void 0:null===(t=d.litellm_params)||void 0===t?void 0:t.model)&&void 0!==r?r:null==d?void 0:null===(s=d.model_info)||void 0===s?void 0:s.key)&&void 0!==o?o:null}),eZ(d),(null==d?void 0:null===(e=d.litellm_params)||void 0===e?void 0:e.cache_control_injection_points)&&eD(!0)},l=async()=>{if(ex)try{let e=(await (0,n.getGuardrailsList)(ex)).guardrails.map(e=>e.guardrail_name);eG(e)}catch(e){console.error("Failed to fetch guardrails:",e)}},t=async()=>{if(ex)try{let e=await (0,n.tagListCall)(ex);eW(e)}catch(e){console.error("Failed to fetch tags:",e)}};(async()=>{if(console.log("accessToken, ",ex),!ex||e$)return;let e=await (0,n.credentialGetCall)(ex,null,en);console.log("existingCredentialResponse, ",e),eO({credential_name:e.credential_name,credential_values:e.credential_values,credential_info:e.credential_info})})(),e(),l(),t()},[ex,en]);let eQ=async e=>{var l;if(console.log("values, ",e),!ex)return;let t={credential_name:e.credential_name,model_id:en,credential_info:{custom_llm_provider:null===(l=ek.litellm_params)||void 0===l?void 0:l.custom_llm_provider}};c.Z.info("Storing credential.."),console.log("credentialResponse, ",await (0,n.credentialCreateCall)(ex,t)),c.Z.success("Credential stored successfully")},eX=async e=>{try{var l;let t;if(!ex)return;eF(!0),console.log("values.model_name, ",e.model_name);let s={...ek.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,tags:e.tags};e.guardrails&&(s.guardrails=e.guardrails),e.cache_control&&(null===(l=e.cache_control_injection_points)||void 0===l?void 0:l.length)>0?s.cache_control_injection_points=e.cache_control_injection_points:delete s.cache_control_injection_points;try{t=e.model_info?JSON.parse(e.model_info):ep.model_info,e.model_access_group&&(t={...t,access_groups:e.model_access_group})}catch(e){c.Z.fromBackend("Invalid JSON in Model Info");return}let a={model_name:e.model_name,litellm_params:s,model_info:t};await (0,n.modelPatchUpdateCall)(ex,a,en);let r={...ek,model_name:e.model_name,litellm_model_name:e.litellm_model_name,litellm_params:s,model_info:t};eZ(r),ey&&ey(r),c.Z.success("Model settings updated successfully"),eP(!1),eT(!1)}catch(e){console.error("Error updating model:",e),c.Z.fromBackend("Failed to update model settings")}finally{eF(!1)}};if(!ep)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(H.Z,{icon:Q.Z,variant:"light",onClick:eh,className:"mb-4",children:"Back to Models"}),(0,s.jsx)(i.Z,{children:"Model not found"})]});let e0=async()=>{try{if(!ex)return;await (0,n.modelDeleteCall)(ex,en),c.Z.success("Model deleted successfully"),ey&&ey({deleted:!0,model_info:{id:en}}),eh()}catch(e){console.error("Error deleting the model:",e),c.Z.fromBackend("Failed to delete model")}},e1=async(e,l)=>{await (0,eu.vQ)(e)&&(ez(e=>({...e,[l]:!0})),setTimeout(()=>{ez(e=>({...e,[l]:!1}))},2e3))};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(H.Z,{icon:Q.Z,variant:"light",onClick:eh,className:"mb-4",children:"Back to Models"}),(0,s.jsxs)(J.Z,{children:["Public Model Name: ",O(ep)]}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(i.Z,{className:"text-gray-500 font-mono",children:ep.model_info.id}),(0,s.jsx)(y.ZP,{type:"text",size:"small",icon:eq["model-id"]?(0,s.jsx)(ec.Z,{size:12}):(0,s.jsx)(em.Z,{size:12}),onClick:()=>e1(ep.model_info.id,"model-id"),className:"left-2 z-10 transition-all duration-200 ".concat(eq["model-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:["Admin"===ef&&(0,s.jsx)(H.Z,{icon:X.Z,variant:"secondary",onClick:()=>eI(!0),className:"flex items-center",children:"Re-use Credentials"}),eY&&(0,s.jsx)(H.Z,{icon:x.Z,variant:"secondary",onClick:()=>eS(!0),className:"flex items-center",children:"Delete Model"})]})]}),(0,s.jsxs)(q.Z,{children:[(0,s.jsxs)(z.Z,{className:"mb-6",children:[(0,s.jsx)(D.Z,{children:"Overview"}),(0,s.jsx)(D.Z,{children:"Raw JSON"})]}),(0,s.jsxs)(K.Z,{children:[(0,s.jsxs)(B.Z,{children:[(0,s.jsxs)(o.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6 mb-6",children:[(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(i.Z,{children:"Provider"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[ep.provider&&(0,s.jsx)("img",{src:(0,d.dr)(ep.provider).logo,alt:"".concat(ep.provider," logo"),className:"w-4 h-4",onError:e=>{let l=e.target,t=l.parentElement;if(t){var s;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===(s=ep.provider)||void 0===s?void 0:s.charAt(0))||"-",t.replaceChild(e,l)}}}),(0,s.jsx)(J.Z,{children:ep.provider||"Not Set"})]})]}),(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(i.Z,{children:"LiteLLM Model"}),(0,s.jsx)("div",{className:"mt-2 overflow-hidden",children:(0,s.jsx)(_.Z,{title:ep.litellm_model_name||"Not Set",children:(0,s.jsx)("div",{className:"break-all text-sm font-medium leading-relaxed cursor-pointer",children:ep.litellm_model_name||"Not Set"})})})]}),(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(i.Z,{children:"Pricing"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(i.Z,{children:["Input: $",ep.input_cost,"/1M tokens"]}),(0,s.jsxs)(i.Z,{children:["Output: $",ep.output_cost,"/1M tokens"]})]})]})]}),(0,s.jsxs)("div",{className:"mb-6 text-sm text-gray-500 flex items-center gap-x-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.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"," ",ep.model_info.created_at?new Date(ep.model_info.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not Set"]}),(0,s.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.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 ",ep.model_info.created_by||"Not Set"]})]}),(0,s.jsxs)(W.Z,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(J.Z,{children:"Model Settings"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[eJ&&eY&&!eL&&(0,s.jsx)(H.Z,{variant:"primary",onClick:()=>eK(!0),className:"flex items-center",children:"Edit Auto Router"}),eY?!eL&&(0,s.jsx)(H.Z,{variant:"secondary",onClick:()=>eT(!0),className:"flex items-center",children:"Edit Model"}):(0,s.jsx)(_.Z,{title:"Only DB models can be edited. You must be an admin or the creator of the model to edit it.",children:(0,s.jsx)(el.Z,{})})]})]}),ek?(0,s.jsx)(f.Z,{form:ew,onFinish:eX,initialValues:{model_name:ek.model_name,litellm_model_name:ek.litellm_model_name,api_base:ek.litellm_params.api_base,custom_llm_provider:ek.litellm_params.custom_llm_provider,organization:ek.litellm_params.organization,tpm:ek.litellm_params.tpm,rpm:ek.litellm_params.rpm,max_retries:ek.litellm_params.max_retries,timeout:ek.litellm_params.timeout,stream_timeout:ek.litellm_params.stream_timeout,input_cost:ek.litellm_params.input_cost_per_token?1e6*ek.litellm_params.input_cost_per_token:(null===(g=ek.model_info)||void 0===g?void 0:g.input_cost_per_token)*1e6||null,output_cost:(null===(b=ek.litellm_params)||void 0===b?void 0:b.output_cost_per_token)?1e6*ek.litellm_params.output_cost_per_token:(null===(N=ek.model_info)||void 0===N?void 0:N.output_cost_per_token)*1e6||null,cache_control:null!==(w=ek.litellm_params)&&void 0!==w&&!!w.cache_control_injection_points,cache_control_injection_points:(null===(k=ek.litellm_params)||void 0===k?void 0:k.cache_control_injection_points)||[],model_access_group:Array.isArray(null===(Z=ek.model_info)||void 0===Z?void 0:Z.access_groups)?ek.model_info.access_groups:[],guardrails:Array.isArray(null===(C=ek.litellm_params)||void 0===C?void 0:C.guardrails)?ek.litellm_params.guardrails:[],tags:Array.isArray(null===(S=ek.litellm_params)||void 0===S?void 0:S.tags)?ek.litellm_params.tags:[]},layout:"vertical",onValuesChange:()=>eP(!0),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Model Name"}),eL?(0,s.jsx)(f.Z.Item,{name:"model_name",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter model name"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:ek.model_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"LiteLLM Model Name"}),eL?(0,s.jsx)(f.Z.Item,{name:"litellm_model_name",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter LiteLLM model name"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:ek.litellm_model_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Input Cost (per 1M tokens)"}),eL?(0,s.jsx)(f.Z.Item,{name:"input_cost",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter input cost"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==ek?void 0:null===(A=ek.litellm_params)||void 0===A?void 0:A.input_cost_per_token)?((null===(I=ek.litellm_params)||void 0===I?void 0:I.input_cost_per_token)*1e6).toFixed(4):(null==ek?void 0:null===(E=ek.model_info)||void 0===E?void 0:E.input_cost_per_token)?(1e6*ek.model_info.input_cost_per_token).toFixed(4):null})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Output Cost (per 1M tokens)"}),eL?(0,s.jsx)(f.Z.Item,{name:"output_cost",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter output cost"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==ek?void 0:null===(P=ek.litellm_params)||void 0===P?void 0:P.output_cost_per_token)?(1e6*ek.litellm_params.output_cost_per_token).toFixed(4):(null==ek?void 0:null===(M=ek.model_info)||void 0===M?void 0:M.output_cost_per_token)?(1e6*ek.model_info.output_cost_per_token).toFixed(4):null})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"API Base"}),eL?(0,s.jsx)(f.Z.Item,{name:"api_base",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter API base"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(F=ek.litellm_params)||void 0===F?void 0:F.api_base)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Custom LLM Provider"}),eL?(0,s.jsx)(f.Z.Item,{name:"custom_llm_provider",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter custom LLM provider"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(L=ek.litellm_params)||void 0===L?void 0:L.custom_llm_provider)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Organization"}),eL?(0,s.jsx)(f.Z.Item,{name:"organization",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter organization"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(T=ek.litellm_params)||void 0===T?void 0:T.organization)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"TPM (Tokens per Minute)"}),eL?(0,s.jsx)(f.Z.Item,{name:"tpm",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter TPM"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(R=ek.litellm_params)||void 0===R?void 0:R.tpm)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"RPM (Requests per Minute)"}),eL?(0,s.jsx)(f.Z.Item,{name:"rpm",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter RPM"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(V=ek.litellm_params)||void 0===V?void 0:V.rpm)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Max Retries"}),eL?(0,s.jsx)(f.Z.Item,{name:"max_retries",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter max retries"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(U=ek.litellm_params)||void 0===U?void 0:U.max_retries)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Timeout (seconds)"}),eL?(0,s.jsx)(f.Z.Item,{name:"timeout",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter timeout"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(G=ek.litellm_params)||void 0===G?void 0:G.timeout)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Stream Timeout (seconds)"}),eL?(0,s.jsx)(f.Z.Item,{name:"stream_timeout",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter stream timeout"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(et=ek.litellm_params)||void 0===et?void 0:et.stream_timeout)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Model Access Groups"}),eL?(0,s.jsx)(f.Z.Item,{name:"model_access_group",className:"mb-0",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:null==eb?void 0:eb.map(e=>({value:e,label:e}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(es=ek.model_info)||void 0===es?void 0:es.access_groups)?Array.isArray(ek.model_info.access_groups)?ek.model_info.access_groups.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:ek.model_info.access_groups.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No groups assigned":ek.model_info.access_groups:"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(i.Z,{className:"font-medium",children:["Guardrails",(0,s.jsx)(_.Z,{title:"Apply safety guardrails to this model to filter content or enforce policies",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(el.Z,{style:{marginLeft:"4px"}})})})]}),eL?(0,s.jsx)(f.Z.Item,{name:"guardrails",className:"mb-0",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing guardrails or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:eU.map(e=>({value:e,label:e}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(er=ek.litellm_params)||void 0===er?void 0:er.guardrails)?Array.isArray(ek.litellm_params.guardrails)?ek.litellm_params.guardrails.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:ek.litellm_params.guardrails.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:e},l))}):"No guardrails assigned":ek.litellm_params.guardrails:"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Tags"}),eL?(0,s.jsx)(f.Z.Item,{name:"tags",className:"mb-0",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing tags or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:Object.values(eH).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(eo=ek.litellm_params)||void 0===eo?void 0:eo.tags)?Array.isArray(ek.litellm_params.tags)?ek.litellm_params.tags.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:ek.litellm_params.tags.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:e},l))}):"No tags assigned":ek.litellm_params.tags:"Not Set"})]}),eL?(0,s.jsx)(ed,{form:ew,showCacheControl:eV,onCacheControlChange:e=>eD(e)}):(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Cache Control"}),(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(ei=ek.litellm_params)||void 0===ei?void 0:ei.cache_control_injection_points)?(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:"Enabled"}),(0,s.jsx)("div",{className:"mt-2",children:ek.litellm_params.cache_control_injection_points.map((e,l)=>(0,s.jsxs)("div",{className:"text-sm text-gray-600 mb-1",children:["Location: ",e.location,",",e.role&&(0,s.jsxs)("span",{children:[" Role: ",e.role]}),void 0!==e.index&&(0,s.jsxs)("span",{children:[" Index: ",e.index]})]},l))})]}):"Disabled"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Model Info"}),eL?(0,s.jsx)(f.Z.Item,{name:"model_info",className:"mb-0",children:(0,s.jsx)(ee.default.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}',defaultValue:JSON.stringify(ep.model_info,null,2)})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(ek.model_info,null,2)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Team ID"}),(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:ep.model_info.team_id||"Not Set"})]})]}),eL&&(0,s.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,s.jsx)(H.Z,{variant:"secondary",onClick:()=>{ew.resetFields(),eP(!1),eT(!1)},children:"Cancel"}),(0,s.jsx)(H.Z,{variant:"primary",onClick:()=>ew.submit(),loading:eM,children:"Save Changes"})]})]})}):(0,s.jsx)(i.Z,{children:"Loading..."})]})]}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(W.Z,{children:(0,s.jsx)("pre",{className:"bg-gray-100 p-4 rounded text-xs overflow-auto",children:JSON.stringify(ep,null,2)})})})]})]}),eC&&(0,s.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,s.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,s.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,s.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,s.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),(0,s.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,s.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,s.jsx)("div",{className:"sm:flex sm:items-start",children:(0,s.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,s.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Model"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this model?"})})]})})}),(0,s.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,s.jsx)(y.ZP,{onClick:e0,className:"ml-2",danger:!0,children:"Delete"}),(0,s.jsx)(y.ZP,{onClick:()=>eS(!1),children:"Cancel"})]})]})]})}),eA&&!e$?(0,s.jsx)(ea,{isVisible:eA,onCancel:()=>eI(!1),onAddCredential:eQ,existingCredential:eR,setIsCredentialModalOpen:eI}):(0,s.jsx)(j.Z,{open:eA,onCancel:()=>eI(!1),title:"Using Existing Credential",children:(0,s.jsx)(i.Z,{children:ep.litellm_params.litellm_credential_name})}),(0,s.jsx)(eN,{isVisible:eB,onCancel:()=>eK(!1),onSuccess:e=>{eZ(e),ey&&ey(e)},modelData:ek||ep,accessToken:ex||"",userRole:ef||""})]})}var ek=t(58643),eZ=e=>{let{selectedProvider:l,providerModels:t,getPlaceholder:a}=e,r=f.Z.useFormInstance(),o=e=>{let t=e.target.value,s=(r.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?l===d.Cl.Azure?{public_name:t,litellm_model:"azure/".concat(t)}:{public_name:t,litellm_model:t}:e);r.setFieldsValue({model_mappings:s})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(f.Z.Item,{label:"LiteLLM Model Name(s)",tooltip:"The model name LiteLLM will send to the LLM API",className:"mb-0",children:[(0,s.jsx)(f.Z.Item,{name:"model",rules:[{required:!0,message:"Please enter ".concat(l===d.Cl.Azure?"a deployment name":"at least one model",".")}],noStyle:!0,children:l===d.Cl.Azure||l===d.Cl.OpenAI_Compatible||l===d.Cl.Ollama?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(b.o,{placeholder:a(l),onChange:l===d.Cl.Azure?e=>{let l=e.target.value,t=l?[{public_name:l,litellm_model:"azure/".concat(l)}]:[];r.setFieldsValue({model:l,model_mappings:t})}:void 0})}):t.length>0?(0,s.jsx)(v.default,{mode:"multiple",allowClear:!0,showSearch:!0,placeholder:"Select models",onChange:e=>{let t=Array.isArray(e)?e:[e];if(t.includes("all-wildcard"))r.setFieldsValue({model_name:void 0,model_mappings:[]});else if(JSON.stringify(r.getFieldValue("model"))!==JSON.stringify(t)){let e=t.map(e=>l===d.Cl.Azure?{public_name:e,litellm_model:"azure/".concat(e)}:{public_name:e,litellm_model:e});r.setFieldsValue({model:t,model_mappings:e})}},optionFilterProp:"children",filterOption:(e,l)=>{var t;return(null!==(t=null==l?void 0:l.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:[{label:"Custom Model Name (Enter below)",value:"custom"},{label:"All ".concat(l," Models (Wildcard)"),value:"all-wildcard"},...t.map(e=>({label:e,value:e}))],style:{width:"100%"}}):(0,s.jsx)(b.o,{placeholder:a(l)})}),(0,s.jsx)(f.Z.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.model!==l.model,children:e=>{let{getFieldValue:t}=e,a=t("model")||[];return(Array.isArray(a)?a:[a]).includes("custom")&&(0,s.jsx)(f.Z.Item,{name:"custom_model_name",rules:[{required:!0,message:"Please enter a custom model name."}],className:"mt-2",children:(0,s.jsx)(b.o,{placeholder:l===d.Cl.Azure?"Enter Azure deployment name":"Enter custom model name",onChange:o})})}})]}),(0,s.jsxs)(w.Z,{children:[(0,s.jsx)(k.Z,{span:10}),(0,s.jsx)(k.Z,{span:14,children:(0,s.jsx)(b.x,{className:"mb-3 mt-1",children:l===d.Cl.Azure?"Your deployment name will be saved as the public model name, and LiteLLM will use 'azure/deployment-name' internally":"The model name LiteLLM will send to the LLM API"})})]})]})},eC=t(81915),eS=t(67187);let eA=e=>{let{content:l,children:t,width:r="auto",className:o=""}=e,[i,n]=(0,a.useState)(!1),[d,c]=(0,a.useState)("top"),m=(0,a.useRef)(null),u=()=>{if(m.current){let e=m.current.getBoundingClientRect(),l=e.top,t=window.innerHeight-e.bottom;l<300&&t>300?c("bottom"):c("top")}};return(0,s.jsxs)("div",{className:"relative inline-block",ref:m,children:[t||(0,s.jsx)(eS.Z,{className:"ml-1 text-gray-500 cursor-help",onMouseEnter:()=>{u(),n(!0)},onMouseLeave:()=>n(!1)}),i&&(0,s.jsxs)("div",{className:"absolute left-1/2 -translate-x-1/2 z-50 bg-black/90 text-white p-2 rounded-md text-sm font-normal shadow-lg ".concat(o),style:{["top"===d?"bottom":"top"]:"100%",width:r,marginBottom:"top"===d?"8px":"0",marginTop:"bottom"===d?"8px":"0"},children:[l,(0,s.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 w-0 h-0",style:{top:"top"===d?"100%":"auto",bottom:"bottom"===d?"100%":"auto",borderTop:"top"===d?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderBottom:"bottom"===d?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderLeft:"6px solid transparent",borderRight:"6px solid transparent"}})]})]})};var eI=()=>{let e=f.Z.useFormInstance(),[l,t]=(0,a.useState)(0),r=f.Z.useWatch("model",e)||[],o=Array.isArray(r)?r:[r],i=f.Z.useWatch("custom_model_name",e),n=!o.includes("all-wildcard"),c=f.Z.useWatch("custom_llm_provider",e);if((0,a.useEffect)(()=>{if(i&&o.includes("custom")){let l=(e.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?c===d.Cl.Azure?{public_name:i,litellm_model:"azure/".concat(i)}:{public_name:i,litellm_model:i}:e);e.setFieldValue("model_mappings",l),t(e=>e+1)}},[i,o,c,e]),(0,a.useEffect)(()=>{if(o.length>0&&!o.includes("all-wildcard")){let l=e.getFieldValue("model_mappings")||[];if(l.length!==o.length||!o.every(e=>l.some(l=>"custom"===e?"custom"===l.litellm_model||l.litellm_model===i:c===d.Cl.Azure?l.litellm_model==="azure/".concat(e):l.litellm_model===e))){let l=o.map(e=>"custom"===e&&i?c===d.Cl.Azure?{public_name:i,litellm_model:"azure/".concat(i)}:{public_name:i,litellm_model:i}:c===d.Cl.Azure?{public_name:e,litellm_model:"azure/".concat(e)}:{public_name:e,litellm_model:e});e.setFieldValue("model_mappings",l),t(e=>e+1)}}},[o,i,c,e]),!n)return null;let m=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-2 font-normal",children:"The name you specify in your API calls to LiteLLM Proxy"}),(0,s.jsxs)("div",{className:"mb-2 font-normal",children:[(0,s.jsx)("strong",{children:"Example:"})," If you name your public model"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"example-name"}),", and choose"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"openai/qwen-plus-latest"})," as the LiteLLM model"]}),(0,s.jsxs)("div",{className:"mb-2 font-normal",children:[(0,s.jsx)("strong",{children:"Usage:"})," You make an API call to the LiteLLM proxy with"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:'model = "example-name"'})]}),(0,s.jsxs)("div",{className:"font-normal",children:[(0,s.jsx)("strong",{children:"Result:"})," LiteLLM sends"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"qwen-plus-latest"})," to the provider"]})]}),u=(0,s.jsx)("div",{children:"The model name LiteLLM will send to the LLM API"}),h=[{title:(0,s.jsxs)("span",{className:"flex items-center",children:["Public Model Name",(0,s.jsx)(eA,{content:m,width:"500px"})]}),dataIndex:"public_name",key:"public_name",render:(l,t,a)=>(0,s.jsx)(I.o,{value:l,onChange:l=>{let t=[...e.getFieldValue("model_mappings")];t[a].public_name=l.target.value,e.setFieldValue("model_mappings",t)}})},{title:(0,s.jsxs)("span",{className:"flex items-center",children:["LiteLLM Model Name",(0,s.jsx)(eA,{content:u,width:"360px"})]}),dataIndex:"litellm_model",key:"litellm_model"}];return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(f.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",rules:[{required:!0,validator:async(e,l)=>{if(!l||0===l.length)throw Error("At least one model mapping is required");if(l.filter(e=>!e.public_name||""===e.public_name.trim()).length>0)throw Error("All model mappings must have valid public names")}}],children:(0,s.jsx)(eC.Z,{dataSource:e.getFieldValue("model_mappings"),columns:h,pagination:!1,size:"small"},l)})})},eE=t(26210),eP=t(90464);let{Link:eM}=g.default;var eF=e=>{let{showAdvancedSettings:l,setShowAdvancedSettings:t,teams:r,guardrailsList:o,tagsList:i}=e,[n]=f.Z.useForm(),[d,c]=a.useState(!1),[m,u]=a.useState("per_token"),[h,p]=a.useState(!1),x=(e,l)=>l&&(isNaN(Number(l))||0>Number(l))?Promise.reject("Please enter a valid positive number"):Promise.resolve(),g=(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,s.jsx)(s.Fragment,{children:(0,s.jsxs)(eE.UQ,{className:"mt-2 mb-4",children:[(0,s.jsx)(eE._m,{children:(0,s.jsx)("b",{children:"Advanced Settings"})}),(0,s.jsx)(eE.X1,{children:(0,s.jsxs)("div",{className:"bg-white rounded-lg",children:[(0,s.jsx)(f.Z.Item,{label:"Custom Pricing",name:"custom_pricing",valuePropName:"checked",className:"mb-4",children:(0,s.jsx)(er.Z,{onChange:e=>{c(e),e||n.setFieldsValue({input_cost_per_token:void 0,output_cost_per_token:void 0,input_cost_per_second:void 0})},className:"bg-gray-600"})}),(0,s.jsx)(f.Z.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(_.Z,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(el.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:"Select existing guardrails. Go to 'Guardrails' tab to create new guardrails.",children:(0,s.jsx)(v.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:o.map(e=>({value:e,label:e}))})}),(0,s.jsx)(f.Z.Item,{label:"Tags",name:"tags",className:"mb-4",children:(0,s.jsx)(v.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(i).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),d&&(0,s.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,s.jsx)(f.Z.Item,{label:"Pricing Model",name:"pricing_model",className:"mb-4",children:(0,s.jsx)(v.default,{defaultValue:"per_token",onChange:e=>u(e),options:[{value:"per_token",label:"Per Million Tokens"},{value:"per_second",label:"Per Second"}]})}),"per_token"===m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Z.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(eE.oi,{})}),(0,s.jsx)(f.Z.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(eE.oi,{})})]}):(0,s.jsx)(f.Z.Item,{label:"Cost Per Second",name:"input_cost_per_second",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(eE.oi,{})})]}),(0,s.jsx)(f.Z.Item,{label:"Use in pass through routes",name:"use_in_pass_through",valuePropName:"checked",className:"mb-4 mt-4",tooltip:(0,s.jsxs)("span",{children:["Allow using these credentials in pass through routes."," ",(0,s.jsx)(eM,{href:"https://docs.litellm.ai/docs/pass_through/vertex_ai",target:"_blank",children:"Learn more"})]}),children:(0,s.jsx)(er.Z,{onChange:e=>{let l=n.getFieldValue("litellm_extra_params");try{let t=l?JSON.parse(l):{};e?t.use_in_pass_through=!0:delete t.use_in_pass_through,Object.keys(t).length>0?n.setFieldValue("litellm_extra_params",JSON.stringify(t,null,2)):n.setFieldValue("litellm_extra_params","")}catch(l){e?n.setFieldValue("litellm_extra_params",JSON.stringify({use_in_pass_through:!0},null,2)):n.setFieldValue("litellm_extra_params","")}},className:"bg-gray-600"})}),(0,s.jsx)(ed,{form:n,showCacheControl:h,onCacheControlChange:e=>{if(p(e),!e){let e=n.getFieldValue("litellm_extra_params");try{let l=e?JSON.parse(e):{};delete l.cache_control_injection_points,Object.keys(l).length>0?n.setFieldValue("litellm_extra_params",JSON.stringify(l,null,2)):n.setFieldValue("litellm_extra_params","")}catch(e){n.setFieldValue("litellm_extra_params","")}}}}),(0,s.jsx)(f.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:g}],children:(0,s.jsx)(eP.Z,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}),(0,s.jsxs)(w.Z,{className:"mb-4",children:[(0,s.jsx)(k.Z,{span:10}),(0,s.jsx)(k.Z,{span:10,children:(0,s.jsxs)(eE.xv,{className:"text-gray-600 text-sm",children:["Pass JSON of litellm supported params"," ",(0,s.jsx)(eM,{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",children:"litellm.completion() call"})]})})]}),(0,s.jsx)(f.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:g}],children:(0,s.jsx)(eP.Z,{rows:4,placeholder:'{ "mode": "chat" }'})})]})})]})})},eL=t(29),eT=t.n(eL),eR=t(23496),eO=t(35291),eV=t(23639);let{Text:eD}=g.default;var eq=e=>{let{formValues:l,accessToken:t,testMode:r,modelName:o="this model",onClose:i,onTestComplete:d}=e,[u,h]=a.useState(null),[p,x]=a.useState(null),[g,f]=a.useState(null),[j,v]=a.useState(!0),[_,b]=a.useState(!1),[N,w]=a.useState(!1),k=async()=>{v(!0),w(!1),h(null),x(null),f(null),b(!1),await new Promise(e=>setTimeout(e,100));try{console.log("Testing connection with form values:",l);let a=await m(l,t,null);if(!a){console.log("No result from prepareModelAddRequest"),h("Failed to prepare model data. Please check your form inputs."),b(!1),v(!1);return}console.log("Result from prepareModelAddRequest:",a);let{litellmParamsObj:r,modelInfoObj:o,modelName:i}=a[0],d=await (0,n.testConnectionRequest)(t,r,o,null==o?void 0:o.mode);if("success"===d.status)c.Z.success("Connection test successful!"),h(null),b(!0);else{var e,s;let l=(null===(e=d.result)||void 0===e?void 0:e.error)||d.message||"Unknown error";h(l),x(r),f(null===(s=d.result)||void 0===s?void 0:s.raw_request_typed_dict),b(!1)}}catch(e){console.error("Test connection error:",e),h(e instanceof Error?e.message:String(e)),b(!1)}finally{v(!1),d&&d()}};a.useEffect(()=>{let e=setTimeout(()=>{k()},200);return()=>clearTimeout(e)},[]);let Z=e=>e?e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error: /,""):"Unknown error",C="string"==typeof u?Z(u):(null==u?void 0:u.message)?Z(u.message):"Unknown error",S=g?((e,l,t)=>{let s=JSON.stringify(l,null,2).split("\n").map(e=>" ".concat(e)).join("\n"),a=Object.entries(t).map(e=>{let[l,t]=e;return"-H '".concat(l,": ").concat(t,"'")}).join(" \\\n ");return"curl -X POST \\\n ".concat(e," \\\n ").concat(a?"".concat(a," \\\n "):"","-H 'Content-Type: application/json' \\\n -d '{\n").concat(s,"\n }'")})(g.raw_request_api_base,g.raw_request_body,g.raw_request_headers||{}):"";return(0,s.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:[j?(0,s.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,s.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,s.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-dc9a0e2d897fe63b"})}),(0,s.jsxs)(eD,{style:{fontSize:"16px"},children:["Testing connection to ",o,"..."]}),(0,s.jsx)(eT(),{id:"dc9a0e2d897fe63b",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)}}"})]}):_?(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,s.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,s.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,s.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,s.jsxs)(eD,{type:"success",style:{fontSize:"18px",fontWeight:500,marginLeft:"10px"},children:["Connection to ",o," successful!"]})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,s.jsx)(eO.Z,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,s.jsxs)(eD,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",o," failed"]})]}),(0,s.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,s.jsxs)(eD,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,s.jsx)(eD,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:C}),u&&(0,s.jsx)("div",{style:{marginTop:"12px"},children:(0,s.jsx)(y.ZP,{type:"link",onClick:()=>w(!N),style:{paddingLeft:0,height:"auto"},children:N?"Hide Details":"Show Details"})})]}),N&&(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)(eD,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Troubleshooting Details"}),(0,s.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 u?u:JSON.stringify(u,null,2)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(eD,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"API Request"}),(0,s.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"250px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:S||"No request data available"}),(0,s.jsx)(y.ZP,{style:{marginTop:"8px"},icon:(0,s.jsx)(eV.Z,{}),onClick:()=>{navigator.clipboard.writeText(S||""),c.Z.success("Copied to clipboard")},children:"Copy to Clipboard"})]})]})}),(0,s.jsx)(eR.Z,{style:{margin:"24px 0 16px"}}),(0,s.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,s.jsx)(y.ZP,{type:"link",href:"https://docs.litellm.ai/docs/providers",target:"_blank",icon:(0,s.jsx)(el.Z,{}),children:"View Documentation"})})]})};let ez=[{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"},{value:"batch",label:"Batch - /batch"},{value:"ocr",label:"OCR - /ocr"}];var eB=t(92858),eK=t(84376),eU=t(20347);let eG=async(e,l,t,s)=>{try{console.log("=== AUTO ROUTER SUBMIT HANDLER CALLED ==="),console.log("handling auto router submit for formValues:",e),console.log("Access token:",l?"Present":"Missing"),console.log("Form:",t?"Present":"Missing"),console.log("Callback:",s?"Present":"Missing");let a={model_name:e.auto_router_name,litellm_params:{model:"auto_router/".concat(e.auto_router_name),auto_router_config:JSON.stringify(e.auto_router_config),auto_router_default_model:e.auto_router_default_model},model_info:{}};e.auto_router_embedding_model&&"custom"!==e.auto_router_embedding_model?a.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model:e.custom_embedding_model&&(a.litellm_params.auto_router_embedding_model=e.custom_embedding_model),e.team_id&&(a.model_info.team_id=e.team_id),e.model_access_group&&e.model_access_group.length>0&&(a.model_info.access_groups=e.model_access_group),console.log("Auto router configuration to be created:",a),console.log("Auto router config (stringified):",a.litellm_params.auto_router_config),console.log("Calling modelCreateCall with:",{accessToken:l?"Present":"Missing",config:a});let r=await (0,n.modelCreateCall)(l,a);console.log("response for auto router create call:",r),t.resetFields()}catch(e){console.error("Failed to add auto router:",e),c.Z.fromBackend("Failed to add auto router: "+e)}},{Title:eH,Link:eW}=g.default;var eY=e=>{let{form:l,handleOk:t,accessToken:r,userRole:o}=e,[i,d]=(0,a.useState)(!1),[m,u]=(0,a.useState)(!1),[h,p]=(0,a.useState)(""),[x,N]=(0,a.useState)([]),[w,k]=(0,a.useState)([]),[Z,C]=(0,a.useState)(!1),[S,A]=(0,a.useState)(!1),[I,E]=(0,a.useState)(null);(0,a.useEffect)(()=>{(async()=>{N((await (0,n.modelAvailableCall)(r,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[r]),(0,a.useEffect)(()=>{(async()=>{try{let e=await (0,eh.p)(r);console.log("Fetched models for auto router:",e),k(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[r]);let P=eU.ZL.includes(o),M=async()=>{u(!0),p("test-".concat(Date.now())),d(!0)},F=()=>{console.log("Auto router submit triggered!"),console.log("Router config:",I);let e=l.getFieldsValue();if(console.log("Form values:",e),!e.auto_router_name){c.Z.fromBackend("Please enter an Auto Router Name");return}if(!e.auto_router_default_model){c.Z.fromBackend("Please select a Default Model");return}if(l.setFieldsValue({custom_llm_provider:"auto_router",model:e.auto_router_name,api_key:"not_required_for_auto_router"}),!I||!I.routes||0===I.routes.length){c.Z.fromBackend("Please configure at least one route for the auto router");return}if(I.routes.filter(e=>!e.name||!e.description||0===e.utterances.length).length>0){c.Z.fromBackend("Please ensure all routes have a target model, description, and at least one utterance");return}l.validateFields().then(e=>{console.log("Form validation passed, submitting with values:",e);let s={...e,auto_router_config:I};console.log("Final submit values:",s),eG(s,r,l,t)}).catch(e=>{console.error("Validation failed:",e);let l=e.errorFields||[];if(l.length>0){let e=l.map(e=>{let l=e.name[0];return({auto_router_name:"Auto Router Name",auto_router_default_model:"Default Model",auto_router_embedding_model:"Embedding Model"})[l]||l});c.Z.fromBackend("Please fill in the following required fields: ".concat(e.join(", ")))}else c.Z.fromBackend("Please fill in all required fields")})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eH,{level:2,children:"Add Auto Router"}),(0,s.jsx)(b.x,{className:"text-gray-600 mb-6",children:"Create an auto router with intelligent routing logic that automatically selects the best model based on user input patterns and semantic matching."}),(0,s.jsx)(ex.Z,{children:(0,s.jsxs)(f.Z,{form:l,onFinish:F,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,s.jsx)(f.Z.Item,{rules:[{required:!0,message:"Auto router name is required"}],label:"Auto Router Name",name:"auto_router_name",tooltip:"Unique name for this auto router configuration",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(b.o,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,s.jsx)("div",{className:"w-full mb-4",children:(0,s.jsx)(eb,{modelInfo:w,value:I,onChange:e=>{E(e),l.setFieldValue("auto_router_config",e)}})}),(0,s.jsx)(f.Z.Item,{rules:[{required:!0,message:"Default model is required"}],label:"Default Model",name:"auto_router_default_model",tooltip:"Fallback model to use when auto routing logic cannot determine the best model",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(v.default,{placeholder:"Select a default model",onChange:e=>{C("custom"===e)},options:[...Array.from(new Set(w.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0})}),(0,s.jsx)(f.Z.Item,{label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Optional: Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(v.default,{value:l.getFieldValue("auto_router_embedding_model"),placeholder:"Select an embedding model (optional)",onChange:e=>{A("custom"===e),l.setFieldValue("auto_router_embedding_model",e)},options:[...Array.from(new Set(w.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0,allowClear:!0})}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Settings"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),P&&(0,s.jsx)(f.Z.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to control who can access this auto router",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:x.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})}),(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(_.Z,{title:"Get help on our github",children:(0,s.jsx)(g.default.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{className:"space-x-2",children:[(0,s.jsx)(y.ZP,{onClick:M,loading:m,children:"Test Connect"}),(0,s.jsx)(y.ZP,{onClick:()=>{console.log("Add Auto Router button clicked!"),console.log("Current router config:",I),console.log("Current form values:",l.getFieldsValue()),F()},children:"Add Auto Router"})]})]})]})}),(0,s.jsx)(j.Z,{title:"Connection Test Results",open:i,onCancel:()=>{d(!1),u(!1)},footer:[(0,s.jsx)(y.ZP,{onClick:()=>{d(!1),u(!1)},children:"Close"},"close")],width:700,children:i&&(0,s.jsx)(eq,{formValues:l.getFieldsValue(),accessToken:r,testMode:"chat",modelName:l.getFieldValue("auto_router_name"),onClose:()=>{d(!1),u(!1)},onTestComplete:()=>u(!1)},h)})]})};let{Title:eJ,Link:e$}=g.default;var eQ=e=>{let{form:l,handleOk:t,selectedProvider:r,setSelectedProvider:o,providerModels:c,setProviderModelsFn:m,getPlaceholder:u,uploadProps:h,showAdvancedSettings:p,setShowAdvancedSettings:x,teams:b,credentials:N,accessToken:Z,userRole:C,premiumUser:S}=e,[I]=f.Z.useForm(),[E,P]=(0,a.useState)("chat"),[M,F]=(0,a.useState)(!1),[L,T]=(0,a.useState)(!1),[R,O]=(0,a.useState)([]),[V,D]=(0,a.useState)({}),[q,z]=(0,a.useState)("");(0,a.useEffect)(()=>{(async()=>{try{let e=(await (0,n.getGuardrailsList)(Z)).guardrails.map(e=>e.guardrail_name);O(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[Z]),(0,a.useEffect)(()=>{(async()=>{try{let e=await (0,n.tagListCall)(Z);D(e)}catch(e){console.error("Failed to fetch tags:",e)}})()},[Z]);let B=async()=>{T(!0),z("test-".concat(Date.now())),F(!0)},[K,U]=(0,a.useState)(!1),[G,H]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{H((await (0,n.modelAvailableCall)(Z,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[Z]);let W=eU.ZL.includes(C);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(ek.v0,{className:"w-full",children:[(0,s.jsxs)(ek.td,{className:"mb-4",children:[(0,s.jsx)(ek.OK,{children:"Add Model"}),(0,s.jsx)(ek.OK,{children:"Add Auto Router"})]}),(0,s.jsxs)(ek.nP,{children:[(0,s.jsxs)(ek.x4,{children:[(0,s.jsx)(eJ,{level:2,children:"Add Model"}),(0,s.jsx)(ex.Z,{children:(0,s.jsx)(f.Z,{form:l,onFinish:e=>{console.log("\uD83D\uDD25 Form onFinish triggered with values:",e),t()},onFinishFailed:e=>{console.log("\uD83D\uDCA5 Form onFinishFailed triggered:",e)},labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.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,s.jsx)(v.default,{showSearch:!0,value:r,onChange:e=>{o(e),m(e),l.setFieldsValue({model:[],model_name:void 0})},children:Object.entries(d.Cl).map(e=>{let[l,t]=e;return(0,s.jsx)(v.default.Option,{value:l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("img",{src:d.cd[t],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,s=l.parentElement;if(s){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=t.charAt(0),s.replaceChild(e,l)}}}),(0,s.jsx)("span",{children:t})]})},l)})})}),(0,s.jsx)(eZ,{selectedProvider:r,providerModels:c,getPlaceholder:u}),(0,s.jsx)(eI,{}),(0,s.jsx)(f.Z.Item,{label:"Mode",name:"mode",className:"mb-1",children:(0,s.jsx)(v.default,{style:{width:"100%"},value:E,onChange:e=>P(e),options:ez})}),(0,s.jsxs)(w.Z,{children:[(0,s.jsx)(k.Z,{span:10}),(0,s.jsx)(k.Z,{span:10,children:(0,s.jsxs)(i.Z,{className:"mb-5 mt-1",children:[(0,s.jsx)("strong",{children:"Optional"})," - LiteLLM endpoint to use when health checking this model"," ",(0,s.jsx)(e$,{href:"https://docs.litellm.ai/docs/proxy/health#health",target:"_blank",children:"Learn more"})]})})]}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(g.default.Text,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter new provider credentials below"})}),(0,s.jsx)(f.Z.Item,{label:"Existing Credentials",name:"litellm_credential_name",children:(0,s.jsx)(v.default,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,l)=>{var t;return(null!==(t=null==l?void 0:l.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:[{value:null,label:"None"},...N.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,s.jsx)(f.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,t=l("litellm_credential_name");return(console.log("\uD83D\uDD11 Credential Name Changed:",t),t)?(0,s.jsx)("div",{className:"text-gray-500 text-sm text-center",children:"Using existing credentials - no additional provider fields needed"}):(0,s.jsx)(A,{selectedProvider:r,uploadProps:h})}}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Model Info Settings"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,s.jsx)(f.Z.Item,{label:"Team-BYOK Model",tooltip:"Only use this model + credential combination for this team. Useful when teams want to onboard their own OpenAI keys.",className:"mb-4",children:(0,s.jsx)(_.Z,{title:S?"":"This is an enterprise-only feature. Upgrade to premium to restrict model+credential combinations to a specific team.",placement:"top",children:(0,s.jsx)(eB.Z,{checked:K,onChange:e=>{U(e),e||l.setFieldValue("team_id",void 0)},disabled:!S})})}),K&&(0,s.jsx)(f.Z.Item,{label:"Select Team",name:"team_id",className:"mb-4",tooltip:"Only keys for this team will be able to call this model.",rules:[{required:K&&!W,message:"Please select a team."}],children:(0,s.jsx)(eK.Z,{teams:b,disabled:!S})}),W&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(f.Z.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to give users access to select models, and add new ones to the group over time.",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:G.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})}),(0,s.jsx)(eF,{showAdvancedSettings:p,setShowAdvancedSettings:x,teams:b,guardrailsList:R,tagsList:V}),(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(_.Z,{title:"Get help on our github",children:(0,s.jsx)(g.default.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{className:"space-x-2",children:[(0,s.jsx)(y.ZP,{onClick:B,loading:L,children:"Test Connect"}),(0,s.jsx)(y.ZP,{htmlType:"submit",children:"Add Model"})]})]})]})})})]}),(0,s.jsx)(ek.x4,{children:(0,s.jsx)(eY,{form:I,handleOk:()=>{I.validateFields().then(e=>{eG(e,Z,I,t)}).catch(e=>{console.error("Validation failed:",e)})},accessToken:Z,userRole:C})})]})]}),(0,s.jsx)(j.Z,{title:"Connection Test Results",open:M,onCancel:()=>{F(!1),T(!1)},footer:[(0,s.jsx)(y.ZP,{onClick:()=>{F(!1),T(!1)},children:"Close"},"close")],width:700,children:M&&(0,s.jsx)(eq,{formValues:l.getFieldsValue(),accessToken:Z,testMode:E,modelName:l.getFieldValue("model_name")||l.getFieldValue("model"),onClose:()=>{F(!1),T(!1)},onTestComplete:()=>T(!1)},q)})]})},eX=t(41649),e0=t(8048),e1=t(61994),e2=t(15731),e4=t(91126);let e5=(e,l,t,a,r,o,i,n,d,c,m)=>[{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e1.Z,{checked:t,indeterminate:l.length>0&&!t,onChange:e=>r(e.target.checked),onClick:e=>e.stopPropagation()}),(0,s.jsx)("span",{children:"Model ID"})]}),accessorKey:"model_info.id",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:t}=e,r=t.original,o=r.model_name,i=l.includes(o);return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e1.Z,{checked:i,onChange:e=>a(o,e.target.checked),onClick:e=>e.stopPropagation()}),(0,s.jsx)(_.Z,{title:r.model_info.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>m&&m(r.model_info.id),children:r.model_info.id})})]})}},{header:"Model Name",accessorKey:"model_name",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:l}=e,t=l.original,a=n(t)||t.model_name;return(0,s.jsx)("div",{className:"font-medium text-sm",children:(0,s.jsx)(_.Z,{title:a,children:(0,s.jsx)("div",{className:"truncate max-w-[200px]",children:a})})})}},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,sortingFn:(e,l,t)=>{var s,a;let r=e.getValue("health_status")||"unknown",o=l.getValue("health_status")||"unknown",i={healthy:0,checking:1,unknown:2,unhealthy:3};return(null!==(s=i[r])&&void 0!==s?s:4)-(null!==(a=i[o])&&void 0!==a?a:4)},cell:l=>{var t;let{row:a}=l,r=a.original,o={status:r.health_status,loading:r.health_loading,error:r.health_error};if(o.loading)return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse"}),(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}),(0,s.jsx)(ev.x,{className:"text-gray-600 text-sm",children:"Checking..."})]});let n=r.model_name,d="healthy"===o.status&&(null===(t=e[n])||void 0===t?void 0:t.successResponse);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[i(o.status),d&&c&&(0,s.jsx)(_.Z,{title:"View response details",placement:"top",children:(0,s.jsx)("button",{onClick:()=>{var l;return c(n,null===(l=e[n])||void 0===l?void 0:l.successResponse)},className:"p-1 text-green-600 hover:text-green-800 hover:bg-green-50 rounded cursor-pointer transition-colors",children:(0,s.jsx)(e2.Z,{className:"h-4 w-4"})})})]})}},{header:"Error Details",accessorKey:"health_error",enableSorting:!1,cell:l=>{let{row:t}=l,a=t.original.model_name,r=e[a];if(!(null==r?void 0:r.error))return(0,s.jsx)(ev.x,{className:"text-gray-400 text-sm",children:"No errors"});let o=r.error,i=r.fullError||r.error;return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"max-w-[200px]",children:(0,s.jsx)(_.Z,{title:o,placement:"top",children:(0,s.jsx)(ev.x,{className:"text-red-600 text-sm truncate",children:o})})}),d&&i!==o&&(0,s.jsx)(_.Z,{title:"View full error details",placement:"top",children:(0,s.jsx)("button",{onClick:()=>d(a,o,i),className:"p-1 text-red-600 hover:text-red-800 hover:bg-red-50 rounded cursor-pointer transition-colors",children:(0,s.jsx)(e2.Z,{className:"h-4 w-4"})})})]})}},{header:"Last Check",accessorKey:"last_check",enableSorting:!0,sortingFn:(e,l,t)=>{let s=e.getValue("last_check")||"Never checked",a=l.getValue("last_check")||"Never checked";if("Never checked"===s&&"Never checked"===a)return 0;if("Never checked"===s)return 1;if("Never checked"===a)return -1;if("Check in progress..."===s&&"Check in progress..."===a)return 0;if("Check in progress..."===s)return -1;if("Check in progress..."===a)return 1;let r=new Date(s),o=new Date(a);return isNaN(r.getTime())&&isNaN(o.getTime())?0:isNaN(r.getTime())?1:isNaN(o.getTime())?-1:o.getTime()-r.getTime()},cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)(ev.x,{className:"text-gray-600 text-sm",children:t.health_loading?"Check in progress...":t.last_check})}},{header:"Last Success",accessorKey:"last_success",enableSorting:!0,sortingFn:(e,l,t)=>{let s=e.getValue("last_success")||"Never succeeded",a=l.getValue("last_success")||"Never succeeded";if("Never succeeded"===s&&"Never succeeded"===a)return 0;if("Never succeeded"===s)return 1;if("Never succeeded"===a)return -1;if("None"===s&&"None"===a)return 0;if("None"===s)return 1;if("None"===a)return -1;let r=new Date(s),o=new Date(a);return isNaN(r.getTime())&&isNaN(o.getTime())?0:isNaN(r.getTime())?1:isNaN(o.getTime())?-1:o.getTime()-r.getTime()},cell:l=>{let{row:t}=l,a=e[t.original.model_name],r=(null==a?void 0:a.lastSuccess)||"None";return(0,s.jsx)(ev.x,{className:"text-gray-600 text-sm",children:r})}},{header:"Actions",id:"actions",cell:e=>{let{row:l}=e,t=l.original,a=t.model_name,r=t.health_status&&"none"!==t.health_status,i=t.health_loading?"Checking...":r?"Re-run Health Check":"Run Health Check";return(0,s.jsx)(_.Z,{title:i,placement:"top",children:(0,s.jsx)("button",{className:"p-2 rounded-md transition-colors ".concat(t.health_loading?"text-gray-400 cursor-not-allowed bg-gray-100":"text-indigo-600 hover:text-indigo-700 hover:bg-indigo-50"),onClick:()=>{t.health_loading||o(a)},disabled:t.health_loading,children:t.health_loading?(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse"}),(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}):r?(0,s.jsx)(U.Z,{className:"h-4 w-4"}):(0,s.jsx)(e4.Z,{className:"h-4 w-4"})})})},enableSorting:!1}],e6=[{pattern:/Missing .* API Key/i,replacement:"Missing API Key"},{pattern:/Connection timeout/i,replacement:"Connection timeout"},{pattern:/Network.*not.*ok/i,replacement:"Network connection failed"},{pattern:/403.*Forbidden/i,replacement:"Access forbidden - check API key permissions"},{pattern:/401.*Unauthorized/i,replacement:"Unauthorized - invalid API key"},{pattern:/429.*rate limit/i,replacement:"Rate limit exceeded"},{pattern:/500.*Internal Server Error/i,replacement:"Provider internal server error"},{pattern:/litellm\.AuthenticationError/i,replacement:"Authentication failed"},{pattern:/litellm\.RateLimitError/i,replacement:"Rate limit exceeded"},{pattern:/litellm\.APIError/i,replacement:"API error"}];var e3=e=>{let{accessToken:l,modelData:t,all_models_on_proxy:r,getDisplayModelName:o,setSelectedModelId:d}=e,[c,m]=(0,a.useState)({}),[u,h]=(0,a.useState)([]),[p,x]=(0,a.useState)(!1),[g,f]=(0,a.useState)(!1),[v,_]=(0,a.useState)(null),[b,N]=(0,a.useState)(!1),[w,k]=(0,a.useState)(null),Z=(0,a.useRef)(null);(0,a.useEffect)(()=>{l&&(null==t?void 0:t.data)&&(async()=>{let e={};t.data.forEach(l=>{e[l.model_name]={status:"none",lastCheck:"None",lastSuccess:"None",loading:!1,error:void 0,fullError:void 0,successResponse:void 0}});try{let s=await (0,n.latestHealthChecksCall)(l);s&&s.latest_health_checks&&"object"==typeof s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(l=>{let[s,a]=l;if(!a)return;let r=null,o=t.data.find(e=>e.model_name===s);if(o)r=o.model_name;else{let e=t.data.find(e=>e.model_info&&e.model_info.id===s);if(e)r=e.model_name;else if(a.model_name){let e=t.data.find(e=>e.model_name===a.model_name);e&&(r=e.model_name)}}if(r){let l=a.error_message||void 0;e[r]={status:a.status||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():"None",loading:!1,error:l?C(l):void 0,fullError:l,successResponse:"healthy"===a.status?a:void 0}}})}catch(e){console.warn("Failed to load health check history (using default states):",e)}m(e)})()},[l,t]);let C=e=>{var l;if(!e)return"Health check failed";let t="string"==typeof e?e:JSON.stringify(e),s=t.match(/(\w+Error):\s*(\d{3})/i);if(s)return"".concat(s[1],": ").concat(s[2]);let a=t.match(/(AuthenticationError|RateLimitError|BadRequestError|InternalServerError|TimeoutError|NotFoundError|ForbiddenError|ServiceUnavailableError|BadGatewayError|ContentPolicyViolationError|\w+Error)/i),r=t.match(/\b(400|401|403|404|408|429|500|502|503|504)\b/);if(a&&r)return"".concat(a[1],": ").concat(r[1]);if(r){let e=r[1];return"".concat({400:"BadRequestError",401:"AuthenticationError",403:"ForbiddenError",404:"NotFoundError",408:"TimeoutError",429:"RateLimitError",500:"InternalServerError",502:"BadGatewayError",503:"ServiceUnavailableError",504:"GatewayTimeoutError"}[e],": ").concat(e)}if(a){let e=a[1],l={AuthenticationError:"401",RateLimitError:"429",BadRequestError:"400",InternalServerError:"500",TimeoutError:"408",NotFoundError:"404",ForbiddenError:"403",ServiceUnavailableError:"503",BadGatewayError:"502",GatewayTimeoutError:"504",ContentPolicyViolationError:"400"}[e];return l?"".concat(e,": ").concat(l):e}for(let{pattern:e,replacement:l}of e6)if(e.test(t))return l;if(/missing.*api.*key|invalid.*key|unauthorized/i.test(t))return"AuthenticationError: 401";if(/rate.*limit|too.*many.*requests/i.test(t))return"RateLimitError: 429";if(/timeout|timed.*out/i.test(t))return"TimeoutError: 408";if(/not.*found/i.test(t))return"NotFoundError: 404";if(/forbidden|access.*denied/i.test(t))return"ForbiddenError: 403";if(/internal.*server.*error/i.test(t))return"InternalServerError: 500";let o=t.replace(/[\n\r]+/g," ").replace(/\s+/g," ").trim(),i=null===(l=o.split(/[.!?]/)[0])||void 0===l?void 0:l.trim();return i&&i.length>0?i.length>100?i.substring(0,97)+"...":i:o.length>100?o.substring(0,97)+"...":o},S=async e=>{if(l){m(l=>({...l,[e]:{...l[e],loading:!0,status:"checking"}}));try{var s,a;let r=await (0,n.individualModelHealthCheckCall)(l,e),o=new Date().toLocaleString();if(r.unhealthy_count>0&&r.unhealthy_endpoints&&r.unhealthy_endpoints.length>0){let l=(null===(s=r.unhealthy_endpoints[0])||void 0===s?void 0:s.error)||"Health check failed",t=C(l);m(s=>{var a;return{...s,[e]:{status:"unhealthy",lastCheck:o,lastSuccess:(null===(a=s[e])||void 0===a?void 0:a.lastSuccess)||"None",loading:!1,error:t,fullError:l}}})}else m(l=>({...l,[e]:{status:"healthy",lastCheck:o,lastSuccess:o,loading:!1,successResponse:r}}));try{let s=await (0,n.latestHealthChecksCall)(l),r=t.data.find(l=>l.model_name===e);if(r){let l=r.model_info.id,t=null===(a=s.latest_health_checks)||void 0===a?void 0:a[l];if(t){let l=t.error_message||void 0;m(s=>{var a,r,o,i,n,d,c;return{...s,[e]:{status:t.status||(null===(a=s[e])||void 0===a?void 0:a.status)||"unknown",lastCheck:t.checked_at?new Date(t.checked_at).toLocaleString():(null===(r=s[e])||void 0===r?void 0:r.lastCheck)||"None",lastSuccess:"healthy"===t.status?t.checked_at?new Date(t.checked_at).toLocaleString():(null===(o=s[e])||void 0===o?void 0:o.lastSuccess)||"None":(null===(i=s[e])||void 0===i?void 0:i.lastSuccess)||"None",loading:!1,error:l?C(l):null===(n=s[e])||void 0===n?void 0:n.error,fullError:l||(null===(d=s[e])||void 0===d?void 0:d.fullError),successResponse:"healthy"===t.status?t:null===(c=s[e])||void 0===c?void 0:c.successResponse}}})}}}catch(e){console.debug("Could not fetch updated status from database (non-critical):",e)}}catch(a){let l=new Date().toLocaleString(),t=a instanceof Error?a.message:String(a),s=C(t);m(a=>{var r;return{...a,[e]:{status:"unhealthy",lastCheck:l,lastSuccess:(null===(r=a[e])||void 0===r?void 0:r.lastSuccess)||"None",loading:!1,error:s,fullError:t}}})}}},A=async()=>{let e=u.length>0?u:r,s=e.reduce((e,l)=>(e[l]={...c[l],loading:!0,status:"checking"},e),{});m(e=>({...e,...s}));let a={},o=e.map(async e=>{if(l)try{let s=await (0,n.individualModelHealthCheckCall)(l,e);a[e]=s;let r=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){var t;let l=(null===(t=s.unhealthy_endpoints[0])||void 0===t?void 0:t.error)||"Health check failed",a=C(l);m(t=>{var s;return{...t,[e]:{status:"unhealthy",lastCheck:r,lastSuccess:(null===(s=t[e])||void 0===s?void 0:s.lastSuccess)||"None",loading:!1,error:a,fullError:l}}})}else m(l=>({...l,[e]:{status:"healthy",lastCheck:r,lastSuccess:r,loading:!1,successResponse:s}}))}catch(a){console.error("Health check failed for ".concat(e,":"),a);let l=new Date().toLocaleString(),t=a instanceof Error?a.message:String(a),s=C(t);m(a=>{var r;return{...a,[e]:{status:"unhealthy",lastCheck:l,lastSuccess:(null===(r=a[e])||void 0===r?void 0:r.lastSuccess)||"None",loading:!1,error:s,fullError:t}}})}});await Promise.allSettled(o);try{if(!l)return;let s=await (0,n.latestHealthChecksCall)(l);s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(l=>{let[s,a]=l,r=t.data.find(e=>e.model_info.id===s);if(r&&e.includes(r.model_name)&&a){let e=r.model_name,l=a.error_message||void 0;m(t=>{let s=t[e];return{...t,[e]:{status:a.status||(null==s?void 0:s.status)||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():(null==s?void 0:s.lastCheck)||"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():(null==s?void 0:s.lastSuccess)||"None",loading:!1,error:l?C(l):null==s?void 0:s.error,fullError:l||(null==s?void 0:s.fullError),successResponse:"healthy"===a.status?a:null==s?void 0:s.successResponse}}})}})}catch(e){console.warn("Failed to fetch updated health statuses from database (non-critical):",e)}},I=e=>{x(e),e?h(r):h([])},E=()=>{f(!1),_(null)},P=()=>{N(!1),k(null)};return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-6",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(J.Z,{children:"Model Health Status"}),(0,s.jsx)(i.Z,{className:"text-gray-600 mt-1",children:"Run health checks on individual models to verify they are working correctly"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[u.length>0&&(0,s.jsx)(H.Z,{size:"sm",variant:"light",onClick:()=>I(!1),className:"px-3 py-1 text-sm",children:"Clear Selection"}),(0,s.jsx)(H.Z,{size:"sm",variant:"secondary",onClick:A,disabled:Object.values(c).some(e=>e.loading),className:"px-3 py-1 text-sm",children:u.length>0&&u.length{l?h(l=>[...l,e]):(h(l=>l.filter(l=>l!==e)),x(!1))},I,S,e=>{switch(e){case"healthy":return(0,s.jsx)(eX.Z,{color:"emerald",children:"healthy"});case"unhealthy":return(0,s.jsx)(eX.Z,{color:"red",children:"unhealthy"});case"checking":return(0,s.jsx)(eX.Z,{color:"blue",children:"checking"});case"none":return(0,s.jsx)(eX.Z,{color:"gray",children:"none"});default:return(0,s.jsx)(eX.Z,{color:"gray",children:"unknown"})}},o,(e,l,t)=>{_({modelName:e,cleanedError:l,fullError:t}),f(!0)},(e,l)=>{k({modelName:e,response:l}),N(!0)},d),data:t.data.map(e=>{let l=c[e.model_name]||{status:"none",lastCheck:"None",loading:!1};return{model_name:e.model_name,model_info:e.model_info,provider:e.provider,litellm_model_name:e.litellm_model_name,health_status:l.status,last_check:l.lastCheck,last_success:l.lastSuccess||"None",health_loading:l.loading,health_error:l.error,health_full_error:l.fullError}}),isLoading:!1,table:Z})}),(0,s.jsx)(j.Z,{title:v?"Health Check Error - ".concat(v.modelName):"Error Details",open:g,onCancel:E,footer:[(0,s.jsx)(y.ZP,{onClick:E,children:"Close"},"close")],width:800,children:v&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Error:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,s.jsx)(i.Z,{className:"text-red-800",children:v.cleanedError})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Full Error Details:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,s.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:v.fullError})})]})]})}),(0,s.jsx)(j.Z,{title:w?"Health Check Response - ".concat(w.modelName):"Response Details",open:b,onCancel:P,footer:[(0,s.jsx)(y.ZP,{onClick:P,children:"Close"},"close")],width:800,children:w&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Status:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:(0,s.jsx)(i.Z,{className:"text-green-800",children:"Health check passed successfully"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Response Details:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,s.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:JSON.stringify(w.response,null,2)})})]})]})})]})},e8=t(7166),e7=t(86462),e9=t(47686),le=t(77355),ll=t(93416),lt=t(95704),ls=e=>{let{accessToken:l,initialModelGroupAlias:t={},onAliasUpdate:r}=e,[o,i]=(0,a.useState)([]),[d,m]=(0,a.useState)({aliasName:"",targetModelGroup:""}),[u,h]=(0,a.useState)(null),[p,g]=(0,a.useState)(!0);(0,a.useEffect)(()=>{i(Object.entries(t).map((e,l)=>{var t;let[s,a]=e;return{id:"".concat(l,"-").concat(s),aliasName:s,targetModelGroup:"string"==typeof a?a:null!==(t=null==a?void 0:a.model)&&void 0!==t?t:""}}))},[t]);let f=async e=>{if(!l)return console.error("Access token is missing"),!1;try{let t={};return e.forEach(e=>{t[e.aliasName]=e.targetModelGroup}),console.log("Saving model group alias:",t),await (0,n.setCallbacksCall)(l,{router_settings:{model_group_alias:t}}),r&&r(t),!0}catch(e){return console.error("Failed to save model group alias settings:",e),c.Z.fromBackend("Failed to save model group alias settings"),!1}},j=async()=>{if(!d.aliasName||!d.targetModelGroup){c.Z.fromBackend("Please provide both alias name and target model group");return}if(o.some(e=>e.aliasName===d.aliasName)){c.Z.fromBackend("An alias with this name already exists");return}let e=[...o,{id:"".concat(Date.now(),"-").concat(d.aliasName),aliasName:d.aliasName,targetModelGroup:d.targetModelGroup}];await f(e)&&(i(e),m({aliasName:"",targetModelGroup:""}),c.Z.success("Alias added successfully"))},v=e=>{h({...e})},_=async()=>{if(!u)return;if(!u.aliasName||!u.targetModelGroup){c.Z.fromBackend("Please provide both alias name and target model group");return}if(o.some(e=>e.id!==u.id&&e.aliasName===u.aliasName)){c.Z.fromBackend("An alias with this name already exists");return}let e=o.map(e=>e.id===u.id?u:e);await f(e)&&(i(e),h(null),c.Z.success("Alias updated successfully"))},y=()=>{h(null)},b=async e=>{let l=o.filter(l=>l.id!==e);await f(l)&&(i(l),c.Z.success("Alias deleted successfully"))},N=o.reduce((e,l)=>(e[l.aliasName]=l.targetModelGroup,e),{});return(0,s.jsxs)(lt.Zb,{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>g(!p),children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)(lt.Dx,{className:"mb-0",children:"Model Group Alias Settings"}),(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Create aliases for your model groups to simplify API calls. For example, you can create an alias 'gpt-4o' that points to 'gpt-4o-mini-openai' model group."})]}),(0,s.jsx)("div",{className:"flex items-center",children:p?(0,s.jsx)(e7.Z,{className:"w-5 h-5 text-gray-500"}):(0,s.jsx)(e9.Z,{className:"w-5 h-5 text-gray-500"})})]}),p&&(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(lt.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,s.jsx)("input",{type:"text",value:d.aliasName,onChange:e=>m({...d,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model Group"}),(0,s.jsx)("input",{type:"text",value:d.targetModelGroup,onChange:e=>m({...d,targetModelGroup:e.target.value}),placeholder:"e.g., gpt-4o-mini-openai",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,s.jsx)("div",{className:"flex items-end",children:(0,s.jsxs)("button",{onClick:j,disabled:!d.aliasName||!d.targetModelGroup,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(d.aliasName&&d.targetModelGroup?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,s.jsx)(le.Z,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,s.jsx)(lt.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,s.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(lt.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(lt.ss,{children:(0,s.jsxs)(lt.SC,{children:[(0,s.jsx)(lt.xs,{className:"py-1 h-8",children:"Alias Name"}),(0,s.jsx)(lt.xs,{className:"py-1 h-8",children:"Target Model Group"}),(0,s.jsx)(lt.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,s.jsxs)(lt.RM,{children:[o.map(e=>(0,s.jsx)(lt.SC,{className:"h-8",children:u&&u.id===e.id?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lt.pj,{className:"py-0.5",children:(0,s.jsx)("input",{type:"text",value:u.aliasName,onChange:e=>h({...u,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,s.jsx)(lt.pj,{className:"py-0.5",children:(0,s.jsx)("input",{type:"text",value:u.targetModelGroup,onChange:e=>h({...u,targetModelGroup:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,s.jsx)(lt.pj,{className:"py-0.5 whitespace-nowrap",children:(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:_,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,s.jsx)("button",{onClick:y,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lt.pj,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,s.jsx)(lt.pj,{className:"py-0.5 text-sm text-gray-500",children:e.targetModelGroup}),(0,s.jsx)(lt.pj,{className:"py-0.5 whitespace-nowrap",children:(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:()=>v(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,s.jsx)(ll.Z,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>b(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,s.jsx)(x.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===o.length&&(0,s.jsx)(lt.SC,{children:(0,s.jsx)(lt.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),(0,s.jsxs)(lt.Zb,{children:[(0,s.jsx)(lt.Dx,{className:"mb-4",children:"Configuration Example"}),(0,s.jsx)(lt.xv,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config.yaml:"}),(0,s.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,s.jsxs)("div",{className:"text-gray-700",children:["router_settings:",(0,s.jsx)("br",{}),"\xa0\xa0model_group_alias:",0===Object.keys(N).length?(0,s.jsxs)("span",{className:"text-gray-500",children:[(0,s.jsx)("br",{}),"\xa0\xa0\xa0\xa0# No aliases configured yet"]}):Object.entries(N).map(e=>{let[l,t]=e;return(0,s.jsxs)("span",{children:[(0,s.jsx)("br",{}),'\xa0\xa0\xa0\xa0"',l,'": "',t,'"']},l)})]})})]})]})]})},la=t(27281),lr=t(57365);let lo=(e,l,t,a,r,o,i,n,c,m,u)=>[{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model ID"}),accessorKey:"model_info.id",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)(_.Z,{title:t.model_info.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>a(t.model_info.id),children:t.model_info.id})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model Information"}),accessorKey:"model_name",size:250,cell:e=>{let{row:l}=e,t=l.original,a=o(l.original)||"-",r=(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Provider:"})," ",t.provider||"-"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Public Model Name:"})," ",a]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"LiteLLM Model Name:"})," ",t.litellm_model_name||"-"]})]});return(0,s.jsx)(_.Z,{title:r,children:(0,s.jsxs)("div",{className:"flex items-start space-x-2 min-w-0 w-full max-w-[250px]",children:[(0,s.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:t.provider?(0,s.jsx)("img",{src:(0,d.dr)(t.provider).logo,alt:"".concat(t.provider," logo"),className:"w-4 h-4",onError:e=>{let l=e.target,s=l.parentElement;if(s){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=t.provider)||void 0===a?void 0:a.charAt(0))||"-",s.replaceChild(e,l)}}}):(0,s.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,s.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate max-w-[210px]",children:a}),(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5 max-w-[210px]",children:t.litellm_model_name||"-"})]})]})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Credentials"}),accessorKey:"litellm_credential_name",size:180,cell:e=>{var l;let{row:t}=e,a=null===(l=t.original.litellm_params)||void 0===l?void 0:l.litellm_credential_name;return a?(0,s.jsx)(_.Z,{title:"Credential: ".concat(a),children:(0,s.jsxs)("div",{className:"flex items-center space-x-2 max-w-[180px]",children:[(0,s.jsx)(X.Z,{className:"w-4 h-4 text-blue-500 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xs truncate",title:a,children:a})]})}):(0,s.jsxs)("div",{className:"flex items-center space-x-2 max-w-[180px]",children:[(0,s.jsx)(X.Z,{className:"w-4 h-4 text-gray-300 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"No credentials"})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Created By"}),accessorKey:"model_info.created_by",sortingFn:"datetime",size:160,cell:e=>{let{row:l}=e,t=l.original,a=t.model_info.created_by,r=t.model_info.created_at?new Date(t.model_info.created_at).toLocaleDateString():null;return(0,s.jsxs)("div",{className:"flex flex-col min-w-0 max-w-[160px]",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate",title:a||"Unknown",children:a||"Unknown"}),(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5",title:r||"Unknown date",children:r||"Unknown date"})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Updated At"}),accessorKey:"model_info.updated_at",sortingFn:"datetime",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)("span",{className:"text-xs",children:t.model_info.updated_at?new Date(t.model_info.updated_at).toLocaleDateString():"-"})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Costs"}),accessorKey:"input_cost",size:120,cell:e=>{let{row:l}=e,t=l.original,a=t.input_cost,r=t.output_cost;return a||r?(0,s.jsx)(_.Z,{title:"Cost per 1M tokens",children:(0,s.jsxs)("div",{className:"flex flex-col min-w-0 max-w-[120px]",children:[a&&(0,s.jsxs)("div",{className:"text-xs font-medium text-gray-900 truncate",children:["In: $",a]}),r&&(0,s.jsxs)("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:["Out: $",r]})]})}):(0,s.jsx)("div",{className:"max-w-[120px]",children:(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"-"})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Team ID"}),accessorKey:"model_info.team_id",cell:e=>{let{row:l}=e,t=l.original;return t.model_info.team_id?(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(_.Z,{title:t.model_info.team_id,children:(0,s.jsxs)(H.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:()=>r(t.model_info.team_id),children:[t.model_info.team_id.slice(0,7),"..."]})})}):"-"}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model Access Group"}),accessorKey:"model_info.model_access_group",enableSorting:!1,cell:e=>{let{row:l}=e,t=l.original,a=t.model_info.access_groups;if(!a||0===a.length)return"-";let r=t.model_info.id,o=m.has(r),i=a.length>1,n=()=>{let e=new Set(m);o?e.delete(r):e.add(r),u(e)};return(0,s.jsxs)("div",{className:"flex items-center gap-1 overflow-hidden",children:[(0,s.jsx)(eX.Z,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:a[0]}),(o||!i&&2===a.length)&&a.slice(1).map((e,l)=>(0,s.jsx)(eX.Z,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:e},l+1)),i&&(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),n()},className:"text-xs text-blue-600 hover:text-blue-800 px-1 py-0.5 rounded hover:bg-blue-50 h-5 leading-tight flex-shrink-0 whitespace-nowrap",children:o?"−":"+".concat(a.length-1)})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Status"}),accessorKey:"model_info.db_model",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)("div",{className:"\n inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium\n ".concat(t.model_info.db_model?"bg-blue-50 text-blue-600":"bg-gray-100 text-gray-600","\n "),children:t.model_info.db_model?"DB Model":"Config Model"})}},{id:"actions",header:"",cell:t=>{var r;let{row:o}=t,i=o.original,n="Admin"===e||(null===(r=i.model_info)||void 0===r?void 0:r.created_by)===l;return(0,s.jsx)("div",{className:"flex items-center justify-end gap-2 pr-4",children:(0,s.jsx)(V.Z,{icon:x.Z,size:"sm",onClick:()=>{n&&(a(i.model_info.id),c(!1))},className:n?"cursor-pointer":"opacity-50 cursor-not-allowed"})})}}];var li=t(11318),ln=t(39760),ld=e=>{let{selectedModelGroup:l,setSelectedModelGroup:t,availableModelGroups:r,availableModelAccessGroups:n,setSelectedModelId:d,setSelectedTeamId:c,setEditModel:m,modelData:u}=e,{userId:h,userRole:p,premiumUser:x}=(0,ln.Z)(),{teams:g}=(0,li.Z)(),[f,j]=(0,a.useState)(""),[v,_]=(0,a.useState)("current_team"),[y,b]=(0,a.useState)("personal"),[N,w]=(0,a.useState)(!1),[k,Z]=(0,a.useState)(null),[C,S]=(0,a.useState)(new Set),[A,I]=(0,a.useState)({pageIndex:0,pageSize:50}),E=(0,a.useRef)(null),P=(0,a.useMemo)(()=>u&&u.data&&0!==u.data.length?u.data.filter(e=>{var t,s,a,r,o;let i=""===f||e.model_name.toLowerCase().includes(f.toLowerCase()),n="all"===l||e.model_name===l||!l||"wildcard"===l&&(null===(t=e.model_name)||void 0===t?void 0:t.includes("*")),d="all"===k||(null===(s=e.model_info.access_groups)||void 0===s?void 0:s.includes(k))||!k,c=!0;return"current_team"===v&&(c="personal"===y?(null===(a=e.model_info)||void 0===a?void 0:a.direct_access)===!0:(null===(o=e.model_info)||void 0===o?void 0:null===(r=o.access_via_team_ids)||void 0===r?void 0:r.includes(y))===!0),i&&n&&d&&c}):[],[u,f,l,k,y,v]),M=(0,a.useMemo)(()=>{let e=A.pageIndex*A.pageSize,l=e+A.pageSize;return P.slice(e,l)},[P,A.pageIndex,A.pageSize]);return(0,a.useEffect)(()=>{I(e=>({...e,pageIndex:0}))},[f,l,k,y,v]),(0,s.jsx)(B.Z,{children:(0,s.jsx)(o.Z,{children:(0,s.jsx)("div",{className:"flex flex-col space-y-4",children:(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsxs)("div",{className:"border-b px-6 py-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(i.Z,{className:"text-lg font-semibold text-gray-900",children:"Current Team:"}),(0,s.jsxs)(la.Z,{className:"w-80",defaultValue:"personal",value:y,onValueChange:e=>b(e),children:[(0,s.jsx)(lr.Z,{value:"personal",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"Personal"})]})}),null==g?void 0:g.filter(e=>e.team_id).map(e=>(0,s.jsx)(lr.Z,{value:e.team_id,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:e.team_alias?"".concat(e.team_alias.slice(0,30),"..."):"Team ".concat(e.team_id.slice(0,30),"...")})]})},e.team_id))]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(i.Z,{className:"text-lg font-semibold text-gray-900",children:"View:"}),(0,s.jsxs)(la.Z,{className:"w-64",defaultValue:"current_team",value:v,onValueChange:e=>_(e),children:[(0,s.jsx)(lr.Z,{value:"current_team",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-purple-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"Current Team Models"})]})}),(0,s.jsx)(lr.Z,{value:"all",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-gray-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"All Available Models"})]})})]})]})]}),"current_team"===v&&(0,s.jsxs)("div",{className:"flex items-start gap-2 mt-3",children:[(0,s.jsx)(el.Z,{className:"text-gray-400 mt-0.5 flex-shrink-0 text-xs"}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"personal"===y?(0,s.jsxs)("span",{children:["To access these models: Create a Virtual Key without selecting a team on the"," ",(0,s.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]}):(0,s.jsxs)("span",{children:['To access these models: Create a Virtual Key and select Team as "',y,'" on the'," ",(0,s.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]})})]})]}),(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Search model names...",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:f,onChange:e=>j(e.target.value)}),(0,s.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,s.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,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ".concat(N?"bg-gray-100":""),onClick:()=>w(!N),children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.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"})}),"Filters"]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:()=>{j(""),t("all"),Z(null),b("personal"),_("current_team"),I({pageIndex:0,pageSize:50})},children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.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"})}),"Reset Filters"]})]}),N&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)("div",{className:"w-64",children:(0,s.jsxs)(la.Z,{value:null!=l?l:"all",onValueChange:e=>t("all"===e?"all":e),placeholder:"Filter by Public Model Name",children:[(0,s.jsx)(lr.Z,{value:"all",children:"All Models"}),(0,s.jsx)(lr.Z,{value:"wildcard",children:"Wildcard Models (*)"}),r.map((e,l)=>(0,s.jsx)(lr.Z,{value:e,children:e},l))]})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsxs)(la.Z,{value:null!=k?k:"all",onValueChange:e=>Z("all"===e?null:e),placeholder:"Filter by Model Access Group",children:[(0,s.jsx)(lr.Z,{value:"all",children:"All Model Access Groups"}),n.map((e,l)=>(0,s.jsx)(lr.Z,{value:e,children:e},l))]})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-sm text-gray-700",children:P.length>0?"Showing ".concat(A.pageIndex*A.pageSize+1," - ").concat(Math.min((A.pageIndex+1)*A.pageSize,P.length)," of ").concat(P.length," results"):"Showing 0 results"}),P.length>A.pageSize&&(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("button",{onClick:()=>I(e=>({...e,pageIndex:e.pageIndex-1})),disabled:0===A.pageIndex,className:"px-3 py-1 text-sm border rounded-md ".concat(0===A.pageIndex?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Previous"}),(0,s.jsx)("button",{onClick:()=>I(e=>({...e,pageIndex:e.pageIndex+1})),disabled:A.pageIndex>=Math.ceil(P.length/A.pageSize)-1,className:"px-3 py-1 text-sm border rounded-md ".concat(A.pageIndex>=Math.ceil(P.length/A.pageSize)-1?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Next"})]})]})]})}),(0,s.jsx)(e0.C,{columns:lo(p,h,x,d,c,O,()=>{},()=>{},m,C,S),data:M,isLoading:!1,table:E})]})})})})},lc=t(93142),lm=t(867),lu=t(3810),lh=t(89245),lp=t(5540),lx=t(8881);let{Text:lg}=g.default;var lf=e=>{let{accessToken:l,onReloadSuccess:t,buttonText:r="Reload Price Data",showIcon:o=!0,size:i="middle",type:d="primary",className:m=""}=e,[u,h]=(0,a.useState)(!1),[p,x]=(0,a.useState)(!1),[g,f]=(0,a.useState)(!1),[v,_]=(0,a.useState)(!1),[b,N]=(0,a.useState)(6),[w,k]=(0,a.useState)(null),[Z,C]=(0,a.useState)(!1);(0,a.useEffect)(()=>{S();let e=setInterval(()=>{S()},3e4);return()=>clearInterval(e)},[l]);let S=async()=>{if(l){C(!0);try{console.log("Fetching reload status...");let e=await (0,n.getModelCostMapReloadStatus)(l);console.log("Received status:",e),k(e)}catch(e){console.error("Failed to fetch reload status:",e),k({scheduled:!1,interval_hours:null,last_run:null,next_run:null})}finally{C(!1)}}},A=async()=>{if(!l){c.Z.fromBackend("No access token available");return}h(!0);try{let e=await (0,n.reloadModelCostMap)(l);"success"===e.status?(c.Z.success("Price data reloaded successfully! ".concat(e.models_count||0," models updated.")),null==t||t(),await S()):c.Z.fromBackend("Failed to reload price data")}catch(e){console.error("Error reloading price data:",e),c.Z.fromBackend("Failed to reload price data. Please try again.")}finally{h(!1)}},I=async()=>{if(!l){c.Z.fromBackend("No access token available");return}if(b<=0){c.Z.fromBackend("Hours must be greater than 0");return}x(!0);try{let e=await (0,n.scheduleModelCostMapReload)(l,b);"success"===e.status?(c.Z.success("Periodic reload scheduled for every ".concat(b," hours")),_(!1),await S()):c.Z.fromBackend("Failed to schedule periodic reload")}catch(e){console.error("Error scheduling reload:",e),c.Z.fromBackend("Failed to schedule periodic reload. Please try again.")}finally{x(!1)}},E=async()=>{if(!l){c.Z.fromBackend("No access token available");return}f(!0);try{let e=await (0,n.cancelModelCostMapReload)(l);"success"===e.status?(c.Z.success("Periodic reload cancelled successfully"),await S()):c.Z.fromBackend("Failed to cancel periodic reload")}catch(e){console.error("Error cancelling reload:",e),c.Z.fromBackend("Failed to cancel periodic reload. Please try again.")}finally{f(!1)}},P=e=>{if(!e)return"Never";try{return new Date(e).toLocaleString()}catch(l){return e}};return(0,s.jsxs)("div",{className:m,children:[(0,s.jsxs)(lc.Z,{direction:"horizontal",size:"middle",style:{marginBottom:16},children:[(0,s.jsx)(lm.Z,{title:"Hard Refresh Price Data",description:"This will immediately fetch the latest pricing information from the remote source. Continue?",onConfirm:A,okText:"Yes",cancelText:"No",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"}},children:(0,s.jsx)(y.ZP,{type:d,size:i,loading:u,icon:o?(0,s.jsx)(lh.Z,{}):void 0,style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"},children:r})}),(null==w?void 0:w.scheduled)?(0,s.jsx)(y.ZP,{type:"default",size:i,danger:!0,icon:(0,s.jsx)(lx.Z,{}),loading:g,onClick:E,style:{borderColor:"#ff4d4f",color:"#ff4d4f",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Cancel Periodic Reload"}):(0,s.jsx)(y.ZP,{type:"default",size:i,icon:(0,s.jsx)(lp.Z,{}),onClick:()=>_(!0),style:{borderColor:"#d9d9d9",color:"#6366f1",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Set Up Periodic Reload"})]}),w&&(0,s.jsx)(ex.Z,{size:"small",style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:8},children:(0,s.jsxs)(lc.Z,{direction:"vertical",size:"small",style:{width:"100%"},children:[w.scheduled?(0,s.jsx)("div",{children:(0,s.jsxs)(lu.Z,{color:"green",icon:(0,s.jsx)(lp.Z,{}),children:["Scheduled every ",w.interval_hours," hours"]})}):(0,s.jsx)(lg,{type:"secondary",children:"No periodic reload scheduled"}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(lg,{type:"secondary",style:{fontSize:"12px"},children:"Last run:"}),(0,s.jsx)(lg,{style:{fontSize:"12px"},children:P(w.last_run)})]}),w.scheduled&&(0,s.jsxs)(s.Fragment,{children:[w.next_run&&(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(lg,{type:"secondary",style:{fontSize:"12px"},children:"Next run:"}),(0,s.jsx)(lg,{style:{fontSize:"12px"},children:P(w.next_run)})]}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(lg,{type:"secondary",style:{fontSize:"12px"},children:"Status:"}),(0,s.jsx)(lu.Z,{color:(null==w?void 0:w.scheduled)?w.last_run?"success":"processing":"default",children:(null==w?void 0:w.scheduled)?w.last_run?"Active":"Ready":"Not scheduled"})]})]})]})}),(0,s.jsxs)(j.Z,{title:"Set Up Periodic Reload",open:v,onOk:I,onCancel:()=>_(!1),confirmLoading:p,okText:"Schedule",cancelText:"Cancel",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"}},children:[(0,s.jsx)("div",{style:{marginBottom:16},children:(0,s.jsx)(lg,{children:"Set up automatic reload of price data every:"})}),(0,s.jsx)("div",{style:{marginBottom:16},children:(0,s.jsx)(eg.Z,{min:1,max:168,value:b,onChange:e=>N(e||6),addonAfter:"hours",style:{width:"100%"}})}),(0,s.jsx)("div",{children:(0,s.jsxs)(lg,{type:"secondary",children:["This will automatically fetch the latest pricing data from the remote source every ",b," hours."]})})]})]})},lj=e=>{let{setModelMap:l}=e,{accessToken:t}=(0,ln.Z)();return(0,s.jsx)(B.Z,{children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(J.Z,{children:"Price Data Management"}),(0,s.jsx)(i.Z,{className:"text-tremor-content",children:"Manage model pricing data and configure automatic reload schedules"})]}),(0,s.jsx)(lf,{accessToken:t,onReloadSuccess:()=>{(async()=>{l(await (0,n.modelCostMap)(t))})()},buttonText:"Reload Price Data",size:"middle",type:"primary",className:"w-full"})]})})};let lv={"BadRequestError (400)":"BadRequestErrorRetries","AuthenticationError (401)":"AuthenticationErrorRetries","TimeoutError (408)":"TimeoutErrorRetries","RateLimitError (429)":"RateLimitErrorRetries","ContentPolicyViolationError (400)":"ContentPolicyViolationErrorRetries","InternalServerError (500)":"InternalServerErrorRetries"};var l_=e=>{let{selectedModelGroup:l,setSelectedModelGroup:t,availableModelGroups:a,globalRetryPolicy:r,setGlobalRetryPolicy:o,defaultRetry:n,modelGroupRetryPolicy:d,setModelGroupRetryPolicy:c,handleSaveRetrySettings:m}=e;return(0,s.jsxs)(B.Z,{children:[(0,s.jsx)("div",{className:"flex items-center gap-4 mb-6",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(i.Z,{children:"Retry Policy Scope:"}),(0,s.jsxs)(la.Z,{className:"ml-2 w-48",defaultValue:"global",value:"global"===l?"global":l||a[0],onValueChange:e=>t(e),children:[(0,s.jsx)(lr.Z,{value:"global",children:"Global Default"}),a.map((e,l)=>(0,s.jsx)(lr.Z,{value:e,onClick:()=>t(e),children:e},l))]})]})}),"global"===l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(J.Z,{children:"Global Retry Policy"}),(0,s.jsx)(i.Z,{className:"mb-6",children:"Default retry settings applied to all model groups unless overridden"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(J.Z,{children:["Retry Policy for ",l]}),(0,s.jsx)(i.Z,{className:"mb-6",children:"Model-specific retry settings. Falls back to global defaults if not set."})]}),lv&&(0,s.jsx)("table",{children:(0,s.jsx)("tbody",{children:Object.entries(lv).map((e,t)=>{var a,m,u,h;let p,[x,g]=e;if("global"===l)p=null!==(a=null==r?void 0:r[g])&&void 0!==a?a:n;else{let e=null==d?void 0:null===(m=d[l])||void 0===m?void 0:m[g];p=null!=e?e:null!==(u=null==r?void 0:r[g])&&void 0!==u?u:n}return(0,s.jsxs)("tr",{className:"flex justify-between items-center mt-2",children:[(0,s.jsxs)("td",{children:[(0,s.jsx)(i.Z,{children:x}),"global"!==l&&(0,s.jsxs)(i.Z,{className:"text-xs text-gray-500 ml-2",children:["(Global: ",null!==(h=null==r?void 0:r[g])&&void 0!==h?h:n,")"]})]}),(0,s.jsx)("td",{children:(0,s.jsx)(eg.Z,{className:"ml-5",value:p,min:0,step:1,onChange:e=>{"global"===l?o(l=>null==e?l:{...null!=l?l:{},[g]:e}):c(t=>{var s;let a=null!==(s=null==t?void 0:t[l])&&void 0!==s?s:{};return{...null!=t?t:{},[l]:{...a,[g]:e}}})}})})]},t)})})}),(0,s.jsx)(H.Z,{className:"mt-6 mr-8",onClick:m,children:"Save"})]})},ly=t(75105),lb=t(40278),lN=t(97765),lw=t(21626),lk=t(97214),lZ=t(28241),lC=t(58834),lS=t(69552),lA=t(71876),lI=t(39789),lE=t(79326),lP=t(2356),lM=t(59664),lF=e=>{let{modelMetrics:l,modelMetricsCategories:t,customTooltip:a,premiumUser:r}=e;return(0,s.jsx)(lM.Z,{title:"Time to First token (s)",className:"h-72",data:l,index:"date",showLegend:!1,categories:t,colors:["indigo","rose"],connectNulls:!0,customTooltip:a})},lL=e=>{let{setSelectedAPIKey:l,keys:t,teams:r,setSelectedCustomer:o,allEndUsers:n}=e,{premiumUser:d}=(0,ln.Z)(),[c,m]=(0,a.useState)(null);return(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"mb-1",children:"Select API Key Name"}),d?(0,s.jsxs)("div",{children:[(0,s.jsxs)(la.Z,{defaultValue:"all-keys",children:[(0,s.jsx)(lr.Z,{value:"all-keys",onClick:()=>{l(null)},children:"All Keys"},"all-keys"),null==t?void 0:t.map((e,t)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,s.jsx)(lr.Z,{value:String(t),onClick:()=>{l(e)},children:e.key_alias},t):null)]}),(0,s.jsx)(i.Z,{className:"mt-1",children:"Select Customer Name"}),(0,s.jsxs)(la.Z,{defaultValue:"all-customers",children:[(0,s.jsx)(lr.Z,{value:"all-customers",onClick:()=>{o(null)},children:"All Customers"},"all-customers"),null==n?void 0:n.map((e,l)=>(0,s.jsx)(lr.Z,{value:e,onClick:()=>{o(e)},children:e},l))]}),(0,s.jsx)(i.Z,{className:"mt-1",children:"Select Team"}),(0,s.jsxs)(la.Z,{className:"w-64 relative z-50",defaultValue:"all",value:null!=c?c:"all",onValueChange:e=>m("all"===e?null:e),children:[(0,s.jsx)(lr.Z,{value:"all",children:"All Teams"}),null==r?void 0:r.filter(e=>e.team_id).map(e=>(0,s.jsx)(lr.Z,{value:e.team_id,children:e.team_alias?"".concat(e.team_alias," (").concat(e.team_id.slice(0,8),"...)"):"Team ".concat(e.team_id.slice(0,8),"...")},e.team_id))]})]}):(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"mt-1",children:"Select Team"}),(0,s.jsxs)(la.Z,{className:"w-64 relative z-50",defaultValue:"all",value:null!=c?c:"all",onValueChange:e=>m("all"===e?null:e),children:[(0,s.jsx)(lr.Z,{value:"all",children:"All Teams"}),null==r?void 0:r.filter(e=>e.team_id).map(e=>(0,s.jsx)(lr.Z,{value:e.team_id,children:e.team_alias?"".concat(e.team_alias," (").concat(e.team_id.slice(0,8),"...)"):"Team ".concat(e.team_id.slice(0,8),"...")},e.team_id))]})]})]})},lT=e=>{let{dateValue:l,setDateValue:t,selectedModelGroup:d,availableModelGroups:c,setShowAdvancedFilters:m,modelMetrics:u,modelMetricsCategories:h,streamingModelMetrics:p,streamingModelMetricsCategories:x,customTooltip:g,slowResponsesData:f,modelExceptions:j,globalExceptionData:v,allExceptions:_,globalExceptionPerDeployment:y,setSelectedAPIKey:b,keys:N,setSelectedCustomer:w,teams:k,allEndUsers:Z,selectedAPIKey:C,selectedCustomer:S,selectedTeam:A,setSelectedModelGroup:I,setModelMetrics:E,setModelMetricsCategories:P,setStreamingModelMetrics:M,setStreamingModelMetricsCategories:F,setSlowResponsesData:L,setModelExceptions:T,setAllExceptions:R,setGlobalExceptionData:O,setGlobalExceptionPerDeployment:V}=e,{accessToken:U,userId:G,userRole:Y,premiumUser:$}=(0,ln.Z)();(0,a.useEffect)(()=>{Q(d,l.from,l.to)},[C,S,A]);let Q=async(e,l,t)=>{if(console.log("Updating model metrics for group:",e),!U||!G||!Y||!l||!t)return;console.log("inside updateModelMetrics - startTime:",l,"endTime:",t),I(e);let s=null==C?void 0:C.token;void 0===s&&(s=null);let a=S;void 0===a&&(a=null);try{let r=await (0,n.modelMetricsCall)(U,G,Y,e,l.toISOString(),t.toISOString(),s,a);console.log("Model metrics response:",r),E(r.data),P(r.all_api_bases);let o=await (0,n.streamingModelMetricsCall)(U,e,l.toISOString(),t.toISOString());M(o.data),F(o.all_api_bases);let i=await (0,n.modelExceptionsCall)(U,G,Y,e,l.toISOString(),t.toISOString(),s,a);console.log("Model exceptions response:",i),T(i.data),R(i.exception_types);let d=await (0,n.modelMetricsSlowResponsesCall)(U,G,Y,e,l.toISOString(),t.toISOString(),s,a);if(console.log("slowResponses:",d),L(d),e){let s=await (0,n.adminGlobalActivityExceptions)(U,null==l?void 0:l.toISOString().split("T")[0],null==t?void 0:t.toISOString().split("T")[0],e);O(s);let a=await (0,n.adminGlobalActivityExceptionsPerDeployment)(U,null==l?void 0:l.toISOString().split("T")[0],null==t?void 0:t.toISOString().split("T")[0],e);V(a)}}catch(e){console.error("Failed to fetch model metrics",e)}};return(0,s.jsxs)(B.Z,{children:[(0,s.jsxs)(o.Z,{numItems:4,className:"mt-2 mb-2",children:[(0,s.jsx)(r.Z,{children:(0,s.jsx)(lI.Z,{value:l,className:"mr-2",onValueChange:e=>{t(e),Q(d,e.from,e.to)}})}),(0,s.jsxs)(r.Z,{className:"ml-2",children:[(0,s.jsx)(i.Z,{children:"Select Model Group"}),(0,s.jsx)(la.Z,{defaultValue:d||c[0],value:d||c[0],children:c.map((e,t)=>(0,s.jsx)(lr.Z,{value:e,onClick:()=>Q(e,l.from,l.to),children:e},t))})]}),(0,s.jsx)(r.Z,{children:(0,s.jsx)(lE.Z,{trigger:"click",content:(0,s.jsx)(lL,{allEndUsers:Z,keys:N,setSelectedAPIKey:b,setSelectedCustomer:w,teams:k}),overlayStyle:{width:"20vw"},children:(0,s.jsx)(H.Z,{icon:lP.Z,size:"md",variant:"secondary",className:"mt-4 ml-2",style:{border:"none"},onClick:()=>m(!0)})})})]}),(0,s.jsxs)(o.Z,{numItems:2,children:[(0,s.jsx)(r.Z,{children:(0,s.jsx)(W.Z,{className:"mr-2 max-h-[400px] min-h-[400px]",children:(0,s.jsxs)(q.Z,{children:[(0,s.jsxs)(z.Z,{variant:"line",defaultValue:"1",children:[(0,s.jsx)(D.Z,{value:"1",children:"Avg. Latency per Token"}),(0,s.jsx)(D.Z,{value:"2",children:"Time to first token"})]}),(0,s.jsxs)(K.Z,{children:[(0,s.jsxs)(B.Z,{children:[(0,s.jsx)("p",{className:"text-gray-500 italic",children:" (seconds/token)"}),(0,s.jsx)(i.Z,{className:"text-gray-500 italic mt-1 mb-1",children:"average Latency for successfull requests divided by the total tokens"}),u&&h&&(0,s.jsx)(ly.Z,{title:"Model Latency",className:"h-72",data:u,showLegend:!1,index:"date",categories:h,connectNulls:!0,customTooltip:g})]}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(lF,{modelMetrics:p,modelMetricsCategories:x,customTooltip:g,premiumUser:$})})]})]})})}),(0,s.jsx)(r.Z,{children:(0,s.jsx)(W.Z,{className:"ml-2 max-h-[400px] min-h-[400px] overflow-y-auto",children:(0,s.jsxs)(lw.Z,{children:[(0,s.jsx)(lC.Z,{children:(0,s.jsxs)(lA.Z,{children:[(0,s.jsx)(lS.Z,{children:"Deployment"}),(0,s.jsx)(lS.Z,{children:"Success Responses"}),(0,s.jsxs)(lS.Z,{children:["Slow Responses ",(0,s.jsx)("p",{children:"Success Responses taking 600+s"})]})]})}),(0,s.jsx)(lk.Z,{children:f.map((e,l)=>(0,s.jsxs)(lA.Z,{children:[(0,s.jsx)(lZ.Z,{children:e.api_base}),(0,s.jsx)(lZ.Z,{children:e.total_count}),(0,s.jsx)(lZ.Z,{children:e.slow_count})]},l))})]})})})]}),(0,s.jsx)(o.Z,{numItems:1,className:"gap-2 w-full mt-2",children:(0,s.jsxs)(W.Z,{children:[(0,s.jsxs)(J.Z,{children:["All Exceptions for ",d]}),(0,s.jsx)(lb.Z,{className:"h-60",data:j,index:"model",categories:_,stack:!0,yAxisWidth:30})]})}),(0,s.jsxs)(o.Z,{numItems:1,className:"gap-2 w-full mt-2",children:[(0,s.jsxs)(W.Z,{children:[(0,s.jsxs)(J.Z,{children:["All Up Rate Limit Errors (429) for ",d]}),(0,s.jsxs)(o.Z,{numItems:1,children:[(0,s.jsxs)(r.Z,{children:[(0,s.jsxs)(lN.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Num Rate Limit Errors ",v.sum_num_rate_limit_exceptions]}),(0,s.jsx)(lb.Z,{className:"h-40",data:v.daily_data,index:"date",colors:["rose"],categories:["num_rate_limit_exceptions"],onValueChange:e=>console.log(e)})]}),(0,s.jsx)(r.Z,{})]})]}),$?(0,s.jsx)(s.Fragment,{children:y.map((e,l)=>(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(J.Z,{children:e.api_base?e.api_base:"Unknown API Base"}),(0,s.jsx)(o.Z,{numItems:1,children:(0,s.jsxs)(r.Z,{children:[(0,s.jsxs)(lN.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Num Rate Limit Errors (429) ",e.sum_num_rate_limit_exceptions]}),(0,s.jsx)(lb.Z,{className:"h-40",data:e.daily_data,index:"date",colors:["rose"],categories:["num_rate_limit_exceptions"],onValueChange:e=>console.log(e)})]})})]},l))}):(0,s.jsx)(s.Fragment,{children:y&&y.length>0&&y.slice(0,1).map((e,l)=>(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(J.Z,{children:"✨ Rate Limit Errors by Deployment"}),(0,s.jsx)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:"Upgrade to see exceptions for all deployments"}),(0,s.jsx)(H.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)(W.Z,{children:[(0,s.jsx)(J.Z,{children:e.api_base}),(0,s.jsx)(o.Z,{numItems:1,children:(0,s.jsxs)(r.Z,{children:[(0,s.jsxs)(lN.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Num Rate Limit Errors ",e.sum_num_rate_limit_exceptions]}),(0,s.jsx)(lb.Z,{className:"h-40",data:e.daily_data,index:"date",colors:["rose"],categories:["num_rate_limit_exceptions"],onValueChange:e=>console.log(e)})]})})]})]},l))})]})]})},lR=e=>{let{accessToken:l,token:t,userRole:m,userID:h,modelData:p={data:[]},keys:x,setModelData:j,premiumUser:v,teams:_}=e,[y]=f.Z.useForm(),[b,N]=(0,a.useState)(null),[w,k]=(0,a.useState)(""),[Z,C]=(0,a.useState)([]),[S,A]=(0,a.useState)([]),[I,E]=(0,a.useState)(d.Cl.OpenAI),[P,M]=(0,a.useState)(!1),[F,L]=(0,a.useState)(null),[T,H]=(0,a.useState)([]),[W,Y]=(0,a.useState)([]),[J,$]=(0,a.useState)(null),[Q,X]=(0,a.useState)([]),[ee,el]=(0,a.useState)([]),[et,es]=(0,a.useState)([]),[ea,er]=(0,a.useState)([]),[eo,ei]=(0,a.useState)([]),[en,ed]=(0,a.useState)([]),[ec,em]=(0,a.useState)([]),[eu,eh]=(0,a.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ep,ex]=(0,a.useState)(null),[eg,ef]=(0,a.useState)(null),[ej,ev]=(0,a.useState)(0),[e_,ey]=(0,a.useState)({}),[eb,eN]=(0,a.useState)([]),[ek,eZ]=(0,a.useState)(!1),[eC,eS]=(0,a.useState)(null),[eA,eI]=(0,a.useState)(null),[eE,eP]=(0,a.useState)([]),[eM,eF]=(0,a.useState)([]),[eL,eT]=(0,a.useState)({}),[eR,eO]=(0,a.useState)(!1),[eV,eD]=(0,a.useState)(null),[eq,ez]=(0,a.useState)(!1),[eB,eK]=(0,a.useState)(null),[eG,eH]=(0,a.useState)(null),[eW,eY]=(0,a.useState)(!1),eJ=(0,a.useRef)(null),[e$,eX]=(0,a.useState)(0),e0=async e=>{try{let l=await (0,n.credentialListCall)(e);console.log("credentials: ".concat(JSON.stringify(l))),eF(l.credentials)}catch(e){console.error("Error fetching credentials:",e)}};(0,a.useEffect)(()=>{let e=e=>{eJ.current&&!eJ.current.contains(e.target)&&eY(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let e1={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;console.log("Resetting vertex_credentials to JSON; jsonStr: ".concat(l)),y.setFieldsValue({vertex_credentials:l}),console.log("Form values right after setting:",y.getFieldsValue())}},l.readAsText(e)}return!1},onChange(e){console.log("Upload onChange triggered with values:",e),console.log("Current form values:",y.getFieldsValue()),"uploading"!==e.file.status&&console.log(e.file,e.fileList),"done"===e.file.status?c.Z.success("".concat(e.file.name," file uploaded successfully")):"error"===e.file.status&&c.Z.fromBackend("".concat(e.file.name," file upload failed."))}},e2=()=>{k(new Date().toLocaleString())},e4=async()=>{if(!l){console.error("Access token is missing");return}try{let e={router_settings:{}};"global"===J?(console.log("Saving global retry policy:",eg),eg&&(e.router_settings.retry_policy=eg),c.Z.success("Global retry settings saved successfully")):(console.log("Saving model group retry policy for",J,":",ep),ep&&(e.router_settings.model_group_retry_policy=ep),c.Z.success("Retry settings saved successfully for ".concat(J))),await (0,n.setCallbacksCall)(l,e)}catch(e){console.error("Failed to save retry settings:",e),c.Z.fromBackend("Failed to save retry settings")}};if((0,a.useEffect)(()=>{if(!l||!t||!m||!h)return;let e=async()=>{try{var e,t,s,a,r,o,i,d,c,u,p,x;let g=await (0,n.modelInfoCall)(l,h,m);console.log("Model data response:",g.data),j(g);let f=await (0,n.modelSettingsCall)(l);f&&A(f);let v=new Set;for(let e=0;e0&&(b=_[_.length-1],console.log("_initial_model_group:",b)),console.log("selectedModelGroup:",J);let N=await (0,n.modelMetricsCall)(l,h,m,b,null===(e=eu.from)||void 0===e?void 0:e.toISOString(),null===(t=eu.to)||void 0===t?void 0:t.toISOString(),null==eC?void 0:eC.token,eA);console.log("Model metrics response:",N),X(N.data),el(N.all_api_bases);let w=await (0,n.streamingModelMetricsCall)(l,b,null===(s=eu.from)||void 0===s?void 0:s.toISOString(),null===(a=eu.to)||void 0===a?void 0:a.toISOString());es(w.data),er(w.all_api_bases);let k=await (0,n.modelExceptionsCall)(l,h,m,b,null===(r=eu.from)||void 0===r?void 0:r.toISOString(),null===(o=eu.to)||void 0===o?void 0:o.toISOString(),null==eC?void 0:eC.token,eA);console.log("Model exceptions response:",k),ei(k.data),ed(k.exception_types);let Z=await (0,n.modelMetricsSlowResponsesCall)(l,h,m,b,null===(i=eu.from)||void 0===i?void 0:i.toISOString(),null===(d=eu.to)||void 0===d?void 0:d.toISOString(),null==eC?void 0:eC.token,eA),C=await (0,n.adminGlobalActivityExceptions)(l,null===(c=eu.from)||void 0===c?void 0:c.toISOString().split("T")[0],null===(u=eu.to)||void 0===u?void 0:u.toISOString().split("T")[0],b);ey(C);let S=await (0,n.adminGlobalActivityExceptionsPerDeployment)(l,null===(p=eu.from)||void 0===p?void 0:p.toISOString().split("T")[0],null===(x=eu.to)||void 0===x?void 0:x.toISOString().split("T")[0],b);eN(S),console.log("dailyExceptions:",C),console.log("dailyExceptionsPerDeplyment:",S),console.log("slowResponses:",Z),em(Z);let I=await (0,n.allEndUsersCall)(l);eP(null==I?void 0:I.map(e=>e.user_id));let E=(await (0,n.getCallbacksCall)(l,h,m)).router_settings;console.log("routerSettingsInfo:",E);let P=E.model_group_retry_policy,M=E.num_retries;console.log("model_group_retry_policy:",P),console.log("default_retries:",M),ex(P),ef(E.retry_policy),ev(M);let F=E.model_group_alias||{};eT(F)}catch(e){console.error("There was an error fetching the model data",e)}};l&&t&&m&&h&&e();let s=async()=>{let e=await (0,n.modelCostMap)(l);console.log("received model cost map data: ".concat(Object.keys(e))),N(e)};null==b&&s(),e2()},[l,t,m,h,b,w,eG]),!p||!l||!t||!m||!h)return(0,s.jsx)("div",{children:"Loading..."});let e5=[],e6=[];for(let e=0;e(console.log("GET PROVIDER CALLED! - ".concat(b)),null!=b&&"object"==typeof b&&e in b)?b[e].litellm_provider:"openai";if(t){let e=t.split("/"),l=e[0];(r=s)||(r=1===e.length?m(t):l)}else r="-";a&&(o=null==a?void 0:a.input_cost_per_token,i=null==a?void 0:a.output_cost_per_token,n=null==a?void 0:a.max_tokens,d=null==a?void 0:a.max_input_tokens),(null==l?void 0:l.litellm_params)&&(c=Object.fromEntries(Object.entries(null==l?void 0:l.litellm_params).filter(e=>{let[l]=e;return"model"!==l&&"api_base"!==l}))),p.data[e].provider=r,p.data[e].input_cost=o,p.data[e].output_cost=i,p.data[e].litellm_model_name=t,e6.push(r),p.data[e].input_cost&&(p.data[e].input_cost=(1e6*Number(p.data[e].input_cost)).toFixed(2)),p.data[e].output_cost&&(p.data[e].output_cost=(1e6*Number(p.data[e].output_cost)).toFixed(2)),p.data[e].max_tokens=n,p.data[e].max_input_tokens=d,p.data[e].api_base=null==l?void 0:null===(le=l.litellm_params)||void 0===le?void 0:le.api_base,p.data[e].cleanedLitellmParams=c,e5.push(l.model_name),console.log(p.data[e])}if(m&&"Admin Viewer"==m){let{Title:e,Paragraph:l}=g.default;return(0,s.jsxs)("div",{children:[(0,s.jsx)(e,{level:1,children:"Access Denied"}),(0,s.jsx)(l,{children:"Ask your proxy admin for access to view all models"})]})}return(console.log("selectedProvider: ".concat(I)),console.log("providerModels.length: ".concat(Z.length)),Object.keys(d.Cl).find(e=>d.Cl[e]===I),eB)?(0,s.jsx)("div",{className:"w-full h-full",children:(0,s.jsx)(G.Z,{teamId:eB,onClose:()=>eK(null),accessToken:l,is_team_admin:"Admin"===m,is_proxy_admin:"Proxy Admin"===m,userModels:e5,editTeam:!1,onUpdate:e2})}):(0,s.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,s.jsx)(o.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,s.jsxs)(r.Z,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Model Management"}),eU.ZL.includes(m)?(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Add and manage models for the proxy"}):(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Add models for teams you are an admin for."})]})}),eV?(0,s.jsx)(ew,{modelId:eV,editModel:!0,onClose:()=>{eD(null),ez(!1)},modelData:p.data.find(e=>e.model_info.id===eV),accessToken:l,userID:h,userRole:m,setEditModalVisible:M,setSelectedModel:L,onModelUpdate:e=>{j({...p,data:p.data.map(l=>l.model_info.id===e.model_info.id?e:l)}),e2()},modelAccessGroups:W}):(0,s.jsxs)(q.Z,{index:e$,onIndexChange:eX,className:"gap-2 h-[75vh] w-full ",children:[(0,s.jsxs)(z.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[eU.ZL.includes(m)?(0,s.jsx)(D.Z,{children:"All Models"}):(0,s.jsx)(D.Z,{children:"Your Models"}),(0,s.jsx)(D.Z,{children:"Add Model"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"LLM Credentials"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Pass-Through Endpoints"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Health Status"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Model Analytics"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Model Retry Settings"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Model Group Alias"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Price Data Reload"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[w&&(0,s.jsxs)(i.Z,{children:["Last Refreshed: ",w]}),(0,s.jsx)(V.Z,{icon:U.Z,variant:"shadow",size:"xs",className:"self-center",onClick:e2})]})]}),(0,s.jsxs)(K.Z,{children:[(0,s.jsx)(ld,{selectedModelGroup:J,setSelectedModelGroup:$,availableModelGroups:T,availableModelAccessGroups:W,setSelectedModelId:eD,setSelectedTeamId:eK,setEditModel:ez,modelData:p}),(0,s.jsx)(B.Z,{className:"h-full",children:(0,s.jsx)(eQ,{form:y,handleOk:()=>{console.log("\uD83D\uDE80 handleOk called from model dashboard!"),console.log("Current form values:",y.getFieldsValue()),y.validateFields().then(e=>{console.log("✅ Validation passed, submitting:",e),u(e,l,y,e2)}).catch(e=>{var l;console.error("❌ Validation failed:",e),console.error("Form errors:",e.errorFields);let t=(null===(l=e.errorFields)||void 0===l?void 0:l.map(e=>"".concat(e.name.join("."),": ").concat(e.errors.join(", "))).join(" | "))||"Unknown validation error";c.Z.fromBackend("Please fill in the following required fields: ".concat(t))})},selectedProvider:I,setSelectedProvider:E,providerModels:Z,setProviderModelsFn:e=>{let l=(0,d.bK)(e,b);C(l),console.log("providerModels: ".concat(l))},getPlaceholder:d.ph,uploadProps:e1,showAdvancedSettings:eR,setShowAdvancedSettings:eO,teams:_,credentials:eM,accessToken:l,userRole:m,premiumUser:v})}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(R,{accessToken:l,uploadProps:e1,credentialList:eM,fetchCredentials:e0})}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(e8.Z,{accessToken:l,userRole:m,userID:h,modelData:p,premiumUser:v})}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(e3,{accessToken:l,modelData:p,all_models_on_proxy:e5,getDisplayModelName:O,setSelectedModelId:eD})}),(0,s.jsx)(lT,{dateValue:eu,setDateValue:eh,selectedModelGroup:J,availableModelGroups:T,setShowAdvancedFilters:eZ,modelMetrics:Q,modelMetricsCategories:ee,streamingModelMetrics:et,streamingModelMetricsCategories:ea,customTooltip:e=>{var l,t;let{payload:a,active:r}=e;if(!r||!a)return null;let o=null===(t=a[0])||void 0===t?void 0:null===(l=t.payload)||void 0===l?void 0:l.date,i=a.sort((e,l)=>l.value-e.value);if(i.length>5){let e=i.length-5;(i=i.slice(0,5)).push({dataKey:"".concat(e," other deployments"),value:a.slice(5).reduce((e,l)=>e+l.value,0),color:"gray"})}return(0,s.jsxs)("div",{className:"w-150 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[o&&(0,s.jsxs)("p",{className:"text-tremor-content-emphasis mb-2",children:["Date: ",o]}),i.map((e,l)=>{let t=parseFloat(e.value.toFixed(5)),a=0===t&&e.value>0?"<0.00001":t.toFixed(5);return(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 mt-1 rounded-full bg-".concat(e.color,"-500")}),(0,s.jsx)("p",{className:"text-tremor-content",children:e.dataKey})]}),(0,s.jsx)("p",{className:"font-medium text-tremor-content-emphasis text-righ ml-2",children:a})]},l)})]})},slowResponsesData:ec,modelExceptions:eo,globalExceptionData:e_,allExceptions:en,globalExceptionPerDeployment:eb,allEndUsers:eE,keys:x,setSelectedAPIKey:eS,setSelectedCustomer:eI,teams:_,selectedAPIKey:eC,selectedCustomer:eA,selectedTeam:eG,setAllExceptions:ed,setGlobalExceptionData:ey,setGlobalExceptionPerDeployment:eN,setModelExceptions:ei,setModelMetrics:X,setModelMetricsCategories:el,setSelectedModelGroup:$,setSlowResponsesData:em,setStreamingModelMetrics:es,setStreamingModelMetricsCategories:er}),(0,s.jsx)(l_,{selectedModelGroup:J,setSelectedModelGroup:$,availableModelGroups:T,globalRetryPolicy:eg,setGlobalRetryPolicy:ef,defaultRetry:ej,modelGroupRetryPolicy:ep,setModelGroupRetryPolicy:ex,handleSaveRetrySettings:e4}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(ls,{accessToken:l,initialModelGroupAlias:eL,onAliasUpdate:eT})}),(0,s.jsx)(lj,{setModelMap:N})]})]})]})})})}},7166:function(e,l,t){t.d(l,{Z:function(){return W}});var s=t(57437),a=t(2265),r=t(20831),o=t(47323),i=t(84264),n=t(96761),d=t(19250),c=t(89970),m=t(33866),u=t(15731),h=t(53410),p=t(74998),x=t(92858),g=t(49566),f=t(12514),j=t(97765),v=t(52787),_=t(13634),y=t(82680),b=t(61778),N=t(24199),w=t(12660),k=t(15424),Z=t(93142),C=t(73002),S=t(45246),A=t(96473),I=t(31283),E=e=>{let{value:l={},onChange:t}=e,[r,o]=(0,a.useState)(Object.entries(l)),i=e=>{let l=r.filter((l,t)=>t!==e);o(l),null==t||t(Object.fromEntries(l))},n=(e,l,s)=>{let a=[...r];a[e]=[l,s],o(a),null==t||t(Object.fromEntries(a))};return(0,s.jsxs)("div",{children:[r.map((e,l)=>{let[t,a]=e;return(0,s.jsxs)(Z.Z,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,s.jsx)(I.o,{placeholder:"Header Name",value:t,onChange:e=>n(l,e.target.value,a)}),(0,s.jsx)(I.o,{placeholder:"Header Value",value:a,onChange:e=>n(l,t,e.target.value)}),(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,s.jsx)(S.Z,{onClick:()=>i(l),style:{cursor:"pointer"}})})]},l)}),(0,s.jsx)(C.ZP,{type:"dashed",onClick:()=>{o([...r,["",""]])},icon:(0,s.jsx)(A.Z,{}),children:"Add Header"})]})},P=t(77565),M=e=>{let{pathValue:l,targetValue:t,includeSubpath:a}=e,r=(0,d.getProxyBaseUrl)();return l&&t?(0,s.jsxs)(f.Z,{className:"p-5",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Preview"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-5",children:"How your requests will be routed"}),(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"Basic routing:"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint"}),(0,s.jsx)("code",{className:"font-mono text-sm text-gray-900",children:l?"".concat(r).concat(l):""})]}),(0,s.jsx)("div",{className:"text-gray-400",children:(0,s.jsx)(P.Z,{className:"text-lg"})}),(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,s.jsx)("code",{className:"font-mono text-sm text-gray-900",children:t})]})]})]}),a&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"With subpaths:"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint + subpath"}),(0,s.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[l&&"".concat(r).concat(l),(0,s.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]}),(0,s.jsx)("div",{className:"text-gray-400",children:(0,s.jsx)(P.Z,{className:"text-lg"})}),(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,s.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[t,(0,s.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]})]}),(0,s.jsxs)("div",{className:"mt-3 text-sm text-gray-600",children:["Any path after ",l," will be appended to the target URL"]})]})}),!a&&(0,s.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md border border-blue-200",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(k.Z,{className:"text-blue-500 mt-0.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{className:"text-sm text-blue-700",children:[(0,s.jsx)("span",{className:"font-medium",children:"Not seeing the routing you wanted?"})," Try enabling - Include Subpaths - above - this allows subroutes like"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded font-mono text-xs",children:"/api/v1/models"})," to be forwarded automatically."]})]})})]})]}):null},F=t(9114),L=t(63709),T=e=>{let{premiumUser:l,authEnabled:t,onAuthChange:a}=e;return(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Security"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-4",children:"When enabled, requests to this endpoint will require a valid LiteLLM API key"}),l?(0,s.jsx)(_.Z.Item,{name:"auth",valuePropName:"checked",className:"mb-0",children:(0,s.jsx)(L.Z,{checked:t,onChange:e=>{a(e)}})}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center mb-3",children:[(0,s.jsx)(L.Z,{disabled:!0,checked:!1,style:{outline:"2px solid #d1d5db",outlineOffset:"2px"}}),(0,s.jsx)("span",{className:"ml-2 text-sm text-gray-400",children:"Authentication (Premium)"})]}),(0,s.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,s.jsxs)(i.Z,{className:"text-sm text-yellow-800",children:["Setting authentication for pass-through endpoints is a LiteLLM Enterprise feature. Get a trial key"," ",(0,s.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})]})};let{Option:R}=v.default;var O=e=>{let{accessToken:l,setPassThroughItems:t,passThroughItems:o,premiumUser:i=!1}=e,[m]=_.Z.useForm(),[u,h]=(0,a.useState)(!1),[p,v]=(0,a.useState)(!1),[Z,C]=(0,a.useState)(""),[S,A]=(0,a.useState)(""),[I,P]=(0,a.useState)(""),[L,R]=(0,a.useState)(!0),[O,V]=(0,a.useState)(!1),D=()=>{m.resetFields(),A(""),P(""),R(!0),h(!1)},q=e=>{let l=e;e&&!e.startsWith("/")&&(l="/"+e),A(l),m.setFieldsValue({path:l})},z=async e=>{console.log("addPassThrough called with:",e),v(!0);try{!i&&"auth"in e&&delete e.auth,console.log("formValues: ".concat(JSON.stringify(e)));let s=(await (0,d.createPassThroughEndpoint)(l,e)).endpoints[0],a=[...o,s];t(a),F.Z.success("Pass-through endpoint created successfully"),m.resetFields(),A(""),P(""),R(!0),h(!1)}catch(e){F.Z.fromBackend("Error creating pass-through endpoint: "+e)}finally{v(!1)}};return(0,s.jsxs)("div",{children:[(0,s.jsx)(r.Z,{className:"mx-auto mb-4 mt-4",onClick:()=>h(!0),children:"+ Add Pass-Through Endpoint"}),(0,s.jsx)(y.Z,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,s.jsx)(w.Z,{className:"text-xl text-blue-500"}),(0,s.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Pass-Through Endpoint"})]}),open:u,width:1e3,onCancel:D,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,s.jsxs)("div",{className:"mt-6",children:[(0,s.jsx)(b.Z,{message:"What is a Pass-Through Endpoint?",description:"Route requests from your LiteLLM proxy to any external API. Perfect for custom models, image generation APIs, or any service you want to proxy through LiteLLM.",type:"info",showIcon:!0,className:"mb-6"}),(0,s.jsxs)(_.Z,{form:m,onFinish:z,layout:"vertical",className:"space-y-6",initialValues:{include_subpath:!0,path:S,target:I},children:[(0,s.jsxs)(f.Z,{className:"p-5",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Configuration"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-5",children:"Configure how requests to your domain will be forwarded to the target API"}),(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsx)(_.Z.Item,{label:(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Path Prefix"}),name:"path",rules:[{required:!0,message:"Path is required",pattern:/^\//}],extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example: /bria, /adobe-photoshop, /elasticsearch"}),className:"mb-4",children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(g.Z,{placeholder:"bria",value:S,onChange:e=>q(e.target.value),className:"flex-1"})})}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Target URL"}),name:"target",rules:[{required:!0,message:"Target URL is required"},{type:"url",message:"Please enter a valid URL"}],extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example:https://engine.prod.bria-api.com"}),className:"mb-4",children:(0,s.jsx)(g.Z,{placeholder:"https://engine.prod.bria-api.com",value:I,onChange:e=>{P(e.target.value),m.setFieldsValue({target:e.target.value})}})}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Include Subpaths"}),(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Forward all subpaths to the target API (recommended for REST APIs)"})]}),(0,s.jsx)(_.Z.Item,{name:"include_subpath",valuePropName:"checked",className:"mb-0",children:(0,s.jsx)(x.Z,{checked:L,onChange:R})})]})]})]}),(0,s.jsx)(M,{pathValue:S,targetValue:I,includeSubpath:L}),(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Headers"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Add headers that will be sent with every request to the target API"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Headers",(0,s.jsx)(c.Z,{title:"Authentication and other headers to forward with requests",children:(0,s.jsx)(k.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"headers",rules:[{required:!0,message:"Please configure the headers"}],extra:(0,s.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,s.jsx)("div",{className:"font-medium mb-1",children:"Add authentication tokens and other required headers"}),(0,s.jsx)("div",{children:"Common examples: auth_token, Authorization, x-api-key"})]}),children:(0,s.jsx)(E,{})})]}),(0,s.jsx)(T,{premiumUser:i,authEnabled:O,onAuthChange:e=>{V(e),m.setFieldsValue({auth:e})}}),(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Billing"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Optional cost tracking for this endpoint"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Cost Per Request (USD)",(0,s.jsx)(c.Z,{title:"Optional: Track costs for requests to this endpoint",children:(0,s.jsx)(k.Z,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:"cost_per_request",extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"The cost charged for each request through this endpoint"}),children:(0,s.jsx)(N.Z,{min:0,step:.001,precision:4,placeholder:"2.0000",size:"large"})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,s.jsx)(r.Z,{variant:"secondary",onClick:D,children:"Cancel"}),(0,s.jsx)(r.Z,{variant:"primary",loading:p,onClick:()=>{console.log("Submit button clicked"),m.submit()},children:p?"Creating...":"Add Pass-Through Endpoint"})]})]})]})})]})},V=t(30078),D=t(64482),q=t(20577),z=t(87769),B=t(42208);let K=e=>{let{value:l}=e,[t,r]=(0,a.useState)(!1),o=JSON.stringify(l,null,2);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("pre",{className:"font-mono text-xs bg-gray-50 p-2 rounded max-w-md overflow-auto",children:t?o:"••••••••"}),(0,s.jsx)("button",{onClick:()=>r(!t),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:t?(0,s.jsx)(z.Z,{className:"w-4 h-4 text-gray-500"}):(0,s.jsx)(B.Z,{className:"w-4 h-4 text-gray-500"})})]})};var U=e=>{let{endpointData:l,onClose:t,accessToken:r,isAdmin:o,premiumUser:i=!1,onEndpointUpdated:n}=e,[c,m]=(0,a.useState)(l),[u,h]=(0,a.useState)(!1),[p,x]=(0,a.useState)(!1),[g,f]=(0,a.useState)((null==l?void 0:l.auth)||!1),[j]=_.Z.useForm(),v=async e=>{try{if(!r||!(null==c?void 0:c.id))return;let l={};if(e.headers)try{l="string"==typeof e.headers?JSON.parse(e.headers):e.headers}catch(e){F.Z.fromBackend("Invalid JSON format for headers");return}let t={path:c.path,target:e.target,headers:l,include_subpath:e.include_subpath,cost_per_request:e.cost_per_request,auth:i?e.auth:void 0};await (0,d.updatePassThroughEndpoint)(r,c.id,t),m({...c,...t}),x(!1),n&&n()}catch(e){console.error("Error updating endpoint:",e),F.Z.fromBackend("Failed to update pass through endpoint")}},y=async()=>{try{if(!r||!(null==c?void 0:c.id))return;await (0,d.deletePassThroughEndpointsCall)(r,c.id),F.Z.success("Pass through endpoint deleted successfully"),t(),n&&n()}catch(e){console.error("Error deleting endpoint:",e),F.Z.fromBackend("Failed to delete pass through endpoint")}};return u?(0,s.jsx)("div",{className:"p-4",children:"Loading..."}):c?(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(C.ZP,{onClick:t,className:"mb-4",children:"← Back"}),(0,s.jsxs)(V.Dx,{children:["Pass Through Endpoint: ",c.path]}),(0,s.jsx)(V.xv,{className:"text-gray-500 font-mono",children:c.id})]})}),(0,s.jsxs)(V.v0,{children:[(0,s.jsxs)(V.td,{className:"mb-4",children:[(0,s.jsx)(V.OK,{children:"Overview"},"overview"),o?(0,s.jsx)(V.OK,{children:"Settings"},"settings"):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(V.nP,{children:[(0,s.jsxs)(V.x4,{children:[(0,s.jsxs)(V.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(V.Zb,{children:[(0,s.jsx)(V.xv,{children:"Path"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(V.Dx,{className:"font-mono",children:c.path})})]}),(0,s.jsxs)(V.Zb,{children:[(0,s.jsx)(V.xv,{children:"Target"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(V.Dx,{children:c.target})})]}),(0,s.jsxs)(V.Zb,{children:[(0,s.jsx)(V.xv,{children:"Configuration"}),(0,s.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,s.jsx)("div",{children:(0,s.jsx)(V.Ct,{color:c.include_subpath?"green":"gray",children:c.include_subpath?"Include Subpath":"Exact Path"})}),(0,s.jsx)("div",{children:(0,s.jsx)(V.Ct,{color:c.auth?"blue":"gray",children:c.auth?"Auth Required":"No Auth"})}),void 0!==c.cost_per_request&&(0,s.jsx)("div",{children:(0,s.jsxs)(V.xv,{children:["Cost per request: $",c.cost_per_request]})})]})]})]}),(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(M,{pathValue:c.path,targetValue:c.target,includeSubpath:c.include_subpath||!1})}),c.headers&&Object.keys(c.headers).length>0&&(0,s.jsxs)(V.Zb,{className:"mt-6",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Headers"}),(0,s.jsxs)(V.Ct,{color:"blue",children:[Object.keys(c.headers).length," headers configured"]})]}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(K,{value:c.headers})})]})]}),o&&(0,s.jsx)(V.x4,{children:(0,s.jsxs)(V.Zb,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(V.Dx,{children:"Pass Through Endpoint Settings"}),(0,s.jsx)("div",{className:"space-x-2",children:!p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(V.zx,{onClick:()=>x(!0),children:"Edit Settings"}),(0,s.jsx)(V.zx,{onClick:y,variant:"secondary",color:"red",children:"Delete Endpoint"})]})})]}),p?(0,s.jsxs)(_.Z,{form:j,onFinish:v,initialValues:{target:c.target,headers:c.headers?JSON.stringify(c.headers,null,2):"",include_subpath:c.include_subpath||!1,cost_per_request:c.cost_per_request,auth:c.auth||!1},layout:"vertical",children:[(0,s.jsx)(_.Z.Item,{label:"Target URL",name:"target",rules:[{required:!0,message:"Please input a target URL"}],children:(0,s.jsx)(V.oi,{placeholder:"https://api.example.com"})}),(0,s.jsx)(_.Z.Item,{label:"Headers (JSON)",name:"headers",children:(0,s.jsx)(D.default.TextArea,{rows:5,placeholder:'{"Authorization": "Bearer your-token", "Content-Type": "application/json"}'})}),(0,s.jsx)(_.Z.Item,{label:"Include Subpath",name:"include_subpath",valuePropName:"checked",children:(0,s.jsx)(L.Z,{})}),(0,s.jsx)(_.Z.Item,{label:"Cost per Request",name:"cost_per_request",children:(0,s.jsx)(q.Z,{min:0,step:.01,precision:2,placeholder:"0.00",addonBefore:"$"})}),(0,s.jsx)(T,{premiumUser:i,authEnabled:g,onAuthChange:e=>{f(e),j.setFieldsValue({auth:e})}}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,s.jsx)(C.ZP,{onClick:()=>x(!1),children:"Cancel"}),(0,s.jsx)(V.zx,{children:"Save Changes"})]})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Path"}),(0,s.jsx)("div",{className:"font-mono",children:c.path})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Target URL"}),(0,s.jsx)("div",{children:c.target})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Include Subpath"}),(0,s.jsx)(V.Ct,{color:c.include_subpath?"green":"gray",children:c.include_subpath?"Yes":"No"})]}),void 0!==c.cost_per_request&&(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Cost per Request"}),(0,s.jsxs)("div",{children:["$",c.cost_per_request]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Authentication Required"}),(0,s.jsx)(V.Ct,{color:c.auth?"green":"gray",children:c.auth?"Yes":"No"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Headers"}),c.headers&&Object.keys(c.headers).length>0?(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(K,{value:c.headers})}):(0,s.jsx)("div",{className:"text-gray-500",children:"No headers configured"})]})]})]})})]})]})]}):(0,s.jsx)("div",{className:"p-4",children:"Pass through endpoint not found"})},G=t(12322);let H=e=>{let{value:l}=e,[t,r]=(0,a.useState)(!1),o=JSON.stringify(l);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{className:"font-mono text-xs",children:t?o:"••••••••"}),(0,s.jsx)("button",{onClick:()=>r(!t),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:t?(0,s.jsx)(z.Z,{className:"w-4 h-4 text-gray-500"}):(0,s.jsx)(B.Z,{className:"w-4 h-4 text-gray-500"})})]})};var W=e=>{let{accessToken:l,userRole:t,userID:x,modelData:g,premiumUser:f}=e,[j,v]=(0,a.useState)([]),[_,y]=(0,a.useState)(null),[b,N]=(0,a.useState)(!1),[w,k]=(0,a.useState)(null);(0,a.useEffect)(()=>{l&&t&&x&&(0,d.getPassThroughEndpointsCall)(l).then(e=>{v(e.endpoints)})},[l,t,x]);let Z=async e=>{k(e),N(!0)},C=async()=>{if(null!=w&&l){try{await (0,d.deletePassThroughEndpointsCall)(l,w);let e=j.filter(e=>e.id!==w);v(e),F.Z.success("Endpoint deleted successfully.")}catch(e){console.error("Error deleting the endpoint:",e),F.Z.fromBackend("Error deleting the endpoint: "+e)}N(!1),k(null)}},S=(e,l)=>{Z(e)},A=[{header:"ID",accessorKey:"id",cell:e=>(0,s.jsx)(c.Z,{title:e.row.original.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>e.row.original.id&&y(e.row.original.id),children:e.row.original.id})})},{header:"Path",accessorKey:"path"},{header:"Target",accessorKey:"target",cell:e=>(0,s.jsx)(i.Z,{children:e.getValue()})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{children:"Authentication"}),(0,s.jsx)(c.Z,{title:"LiteLLM Virtual Key required to call endpoint",children:(0,s.jsx)(u.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"auth",cell:e=>(0,s.jsx)(m.Z,{color:e.getValue()?"green":"gray",children:e.getValue()?"Yes":"No"})},{header:"Headers",accessorKey:"headers",cell:e=>(0,s.jsx)(H,{value:e.getValue()||{}})},{header:"Actions",id:"actions",cell:e=>{let{row:l}=e;return(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)(o.Z,{icon:h.Z,size:"sm",onClick:()=>l.original.id&&y(l.original.id),title:"Edit"}),(0,s.jsx)(o.Z,{icon:p.Z,size:"sm",onClick:()=>S(l.original.id,l.index),title:"Delete"})]})}}];if(!l)return null;if(_){console.log("selectedEndpointId",_),console.log("generalSettings",j);let e=j.find(e=>e.id===_);return e?(0,s.jsx)(U,{endpointData:e,onClose:()=>y(null),accessToken:l,isAdmin:"Admin"===t||"admin"===t,premiumUser:f,onEndpointUpdated:()=>{l&&(0,d.getPassThroughEndpointsCall)(l).then(e=>{v(e.endpoints)})}}):(0,s.jsx)("div",{children:"Endpoint not found"})}return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Z,{children:"Pass Through Endpoints"}),(0,s.jsx)(i.Z,{className:"text-tremor-content",children:"Configure and manage your pass-through endpoints"})]}),(0,s.jsx)(O,{accessToken:l,setPassThroughItems:v,passThroughItems:j,premiumUser:f}),(0,s.jsx)(G.w,{data:j,columns:A,renderSubComponent:()=>(0,s.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:!1,noDataMessage:"No pass-through endpoints configured"}),b&&(0,s.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,s.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,s.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,s.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,s.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),(0,s.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,s.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,s.jsx)("div",{className:"sm:flex sm:items-start",children:(0,s.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,s.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Pass-Through Endpoint"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this pass-through endpoint? This action cannot be undone."})})]})})}),(0,s.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,s.jsx)(r.Z,{onClick:C,color:"red",className:"ml-2",children:"Delete"}),(0,s.jsx)(r.Z,{onClick:()=>{N(!1),k(null)},children:"Cancel"})]})]})]})})]})}},39789:function(e,l,t){t.d(l,{Z:function(){return i}});var s=t(57437),a=t(2265),r=t(21487),o=t(84264),i=e=>{let{value:l,onValueChange:t,label:i="Select Time Range",className:n="",showTimeRange:d=!0}=e,[c,m]=(0,a.useState)(!1),u=(0,a.useRef)(null),h=(0,a.useCallback)(e=>{m(!0),setTimeout(()=>m(!1),1500),t(e),requestIdleCallback(()=>{if(e.from){let l;let s={...e},a=new Date(e.from);l=new Date(e.to?e.to:e.from),a.toDateString(),l.toDateString(),a.setHours(0,0,0,0),l.setHours(23,59,59,999),s.from=a,s.to=l,t(s)}},{timeout:100})},[t]),p=(0,a.useCallback)((e,l)=>{if(!e||!l)return"";let t=e=>e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});if(e.toDateString()!==l.toDateString())return"".concat(t(e)," - ").concat(t(l));{let t=e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),s=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),a=l.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});return"".concat(t,": ").concat(s," - ").concat(a)}},[]);return(0,s.jsxs)("div",{className:n,children:[i&&(0,s.jsx)(o.Z,{className:"mb-2",children:i}),(0,s.jsxs)("div",{className:"relative w-fit",children:[(0,s.jsx)("div",{ref:u,children:(0,s.jsx)(r.Z,{enableSelect:!0,value:l,onValueChange:h,placeholder:"Select date range",enableClear:!1,style:{zIndex:100}})}),c&&(0,s.jsx)("div",{className:"absolute top-1/2 animate-pulse",style:{left:"calc(100% + 8px)",transform:"translateY(-50%)",zIndex:110},children:(0,s.jsxs)("div",{className:"flex items-center gap-1 text-green-600 text-sm font-medium bg-white px-2 py-1 rounded-full border border-green-200 shadow-sm whitespace-nowrap",children:[(0,s.jsx)("div",{className:"w-3 h-3 bg-green-500 text-white rounded-full flex items-center justify-center text-xs",children:"✓"}),(0,s.jsx)("span",{className:"text-xs",children:"Selected"})]})})]}),d&&l.from&&l.to&&(0,s.jsx)(o.Z,{className:"mt-2 text-xs text-gray-500",children:p(l.from,l.to)})]})}},12322:function(e,l,t){t.d(l,{w:function(){return n}});var s=t(57437),a=t(2265),r=t(71594),o=t(24525),i=t(19130);function n(e){let{data:l=[],columns:t,getRowCanExpand:n,renderSubComponent:d,isLoading:c=!1,loadingMessage:m="\uD83D\uDE85 Loading logs...",noDataMessage:u="No logs found"}=e,h=(0,r.b7)({data:l,columns:t,getRowCanExpand:n,getRowId:(e,l)=>{var t;return null!==(t=null==e?void 0:e.request_id)&&void 0!==t?t:String(l)},getCoreRowModel:(0,o.sC)(),getExpandedRowModel:(0,o.rV)()});return(0,s.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,s.jsxs)(i.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,s.jsx)(i.ss,{children:h.getHeaderGroups().map(e=>(0,s.jsx)(i.SC,{children:e.headers.map(e=>(0,s.jsx)(i.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,r.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,s.jsx)(i.RM,{children:c?(0,s.jsx)(i.SC,{children:(0,s.jsx)(i.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:m})})})}):h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(i.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,s.jsx)(i.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,r.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,s.jsx)(i.SC,{children:(0,s.jsx)(i.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,s.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:d({row:e})})})})]},e.id)):(0,s.jsx)(i.SC,{children:(0,s.jsx)(i.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:u})})})})})]})})}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1598],{16312:function(e,l,t){t.d(l,{z:function(){return s.Z}});var s=t(20831)},58643:function(e,l,t){t.d(l,{OK:function(){return s.Z},nP:function(){return i.Z},td:function(){return r.Z},v0:function(){return a.Z},x4:function(){return o.Z}});var s=t(12485),a=t(18135),r=t(35242),o=t(29706),i=t(77991)},81598:function(e,l,t){t.d(l,{Z:function(){return lR}});var s=t(57437),a=t(2265),r=t(49804),o=t(67101),i=t(84264),n=t(19250),d=t(42673),c=t(9114);let m=async(e,l,t)=>{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 t=e.custom_llm_provider,s=d.fK[t]+"/*";e.model_name=s,l.push({public_name:s,litellm_model:s}),e.model=s}let t=[];for(let s of l){let l={},a={},r=s.public_name;for(let[t,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"!==t&&"pricing_model"!==t&&"cache_control"!==t){if("model_name"==t)l.model=r;else if("custom_llm_provider"==t){console.log("custom_llm_provider:",r);let e=d.fK[r];l.custom_llm_provider=e,console.log("custom_llm_provider mappingResult:",e)}else if("model"==t)continue;else if("base_model"===t)a[t]=r;else if("team_id"===t)a.team_id=r;else if("model_access_group"===t)a.access_groups=r;else if("mode"==t)console.log("placing mode in modelInfo"),a.mode=r,delete l.mode;else if("custom_model_name"===t)l.model=r;else if("litellm_extra_params"==t){console.log("litellm_extra_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r)}catch(e){throw c.Z.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[t,s]of Object.entries(e))l[t]=s}}else if("model_info_params"==t){console.log("model_info_params:",r);let e={};if(r&&void 0!=r){try{e=JSON.parse(r)}catch(e){throw c.Z.fromBackend("Failed to parse LiteLLM Extra Params: "+e),Error("Failed to parse litellm_extra_params: "+e)}for(let[l,t]of Object.entries(e))a[l]=t}}else if("input_cost_per_token"===t||"output_cost_per_token"===t||"input_cost_per_second"===t){r&&(l[t]=Number(r));continue}else l[t]=r}t.push({litellmParamsObj:l,modelInfoObj:a,modelName:r})}return t}catch(e){c.Z.fromBackend("Failed to create model: "+e)}},u=async(e,l,t,s)=>{try{let a=await m(e,l,t);if(!a||0===a.length)return;for(let e of a){let{litellmParamsObj:t,modelInfoObj:s,modelName:a}=e,r={model_name:a,litellm_params:t,model_info:s},o=await (0,n.modelCreateCall)(l,r);console.log("response for model create call: ".concat(o.data))}s&&s(),t.resetFields()}catch(e){c.Z.fromBackend("Failed to add model: "+e)}};var h=t(62490),p=t(53410),x=t(74998),g=t(93192),f=t(13634),j=t(82680),v=t(52787),_=t(89970),y=t(73002),b=t(56522),N=t(65319),w=t(47451),k=t(69410),Z=t(3632);let{Link:C}=g.default,S={[d.Cl.OpenAI]:[{key:"api_base",label:"API Base",type:"text",placeholder:"https://api.openai.com/v1",tooltip:"Common endpoints: https://api.openai.com/v1, https://eu.api.openai.com, https://us.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}],[d.Cl.OpenAI_Text]:[{key:"api_base",label:"API Base",type:"text",placeholder:"https://api.openai.com/v1",tooltip:"Common endpoints: https://api.openai.com/v1, https://eu.api.openai.com, https://us.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}],[d.Cl.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"}],[d.Cl.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}],[d.Cl.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}],[d.Cl.Azure_AI_Studio]:[{key:"api_base",label:"API Base",placeholder:"https://.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}],[d.Cl.OpenAI_Compatible]:[{key:"api_base",label:"API Base",placeholder:"https://...",required:!0},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[d.Cl.Dashscope]:[{key:"api_key",label:"Dashscope API Key",type:"password",required:!0},{key:"api_base",label:"API Base",placeholder:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",defaultValue:"https://dashscope-intl.aliyuncs.com/compatible-mode/v1",required:!0,tooltip:"The base URL for your Dashscope server. Defaults to https://dashscope-intl.aliyuncs.com/compatible-mode/v1 if not specified."}],[d.Cl.OpenAI_Text_Compatible]:[{key:"api_base",label:"API Base",placeholder:"https://...",required:!0},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[d.Cl.Bedrock]:[{key:"aws_access_key_id",label:"AWS Access Key ID",type:"password",required:!1,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",type:"password",required:!1,tooltip:"You can provide the raw key or the environment variable (e.g. `os.environ/MY_SECRET_KEY`)."},{key:"aws_session_token",label:"AWS Session Token",type:"password",required:!1,tooltip:"Temporary credentials session token. You can provide the raw token or the environment variable (e.g. `os.environ/MY_SESSION_TOKEN`)."},{key:"aws_region_name",label:"AWS Region Name",placeholder:"us-east-1",required:!1,tooltip:"You can provide the raw key or the environment variable (e.g. `os.environ/MY_SECRET_KEY`)."},{key:"aws_session_name",label:"AWS Session Name",placeholder:"my-session",required:!1,tooltip:"Name for the AWS session. You can provide the raw value or the environment variable (e.g. `os.environ/MY_SESSION_NAME`)."},{key:"aws_profile_name",label:"AWS Profile Name",placeholder:"default",required:!1,tooltip:"AWS profile name to use for authentication. You can provide the raw value or the environment variable (e.g. `os.environ/MY_PROFILE_NAME`)."},{key:"aws_role_name",label:"AWS Role Name",placeholder:"MyRole",required:!1,tooltip:"AWS IAM role name to assume. You can provide the raw value or the environment variable (e.g. `os.environ/MY_ROLE_NAME`)."},{key:"aws_web_identity_token",label:"AWS Web Identity Token",type:"password",required:!1,tooltip:"Web identity token for OIDC authentication. You can provide the raw token or the environment variable (e.g. `os.environ/MY_WEB_IDENTITY_TOKEN`)."},{key:"aws_bedrock_runtime_endpoint",label:"AWS Bedrock Runtime Endpoint",placeholder:"https://bedrock-runtime.us-east-1.amazonaws.com",required:!1,tooltip:"Custom Bedrock runtime endpoint URL. You can provide the raw value or the environment variable (e.g. `os.environ/MY_BEDROCK_ENDPOINT`)."}],[d.Cl.SageMaker]:[{key:"aws_access_key_id",label:"AWS Access Key ID",type:"password",required:!1,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",type:"password",required:!1,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:!1,tooltip:"You can provide the raw key or the environment variable (e.g. `os.environ/MY_SECRET_KEY`)."}],[d.Cl.Ollama]:[{key:"api_base",label:"API Base",placeholder:"http://localhost:11434",defaultValue:"http://localhost:11434",required:!1,tooltip:"The base URL for your Ollama server. Defaults to http://localhost:11434 if not specified."}],[d.Cl.Anthropic]:[{key:"api_key",label:"API Key",placeholder:"sk-",type:"password",required:!0}],[d.Cl.Deepgram]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.ElevenLabs]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Google_AI_Studio]:[{key:"api_key",label:"API Key",placeholder:"aig-",type:"password",required:!0}],[d.Cl.Groq]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.MistralAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Deepseek]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Cohere]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Databricks]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.xAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.AIML]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Cerebras]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Sambanova]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Perplexity]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.TogetherAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Openrouter]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.FireworksAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.GradientAI]:[{key:"api_base",label:"GradientAI Endpoint",placeholder:"https://...",required:!1},{key:"api_key",label:"GradientAI API Key",type:"password",required:!0}],[d.Cl.Triton]:[{key:"api_key",label:"API Key",type:"password",required:!1},{key:"api_base",label:"API Base",placeholder:"http://localhost:8000/generate",required:!1}],[d.Cl.Hosted_Vllm]:[{key:"api_base",label:"API Base",placeholder:"https://...",required:!0},{key:"api_key",label:"OpenAI API Key",type:"password",required:!0}],[d.Cl.Voyage]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.JinaAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.VolcEngine]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.DeepInfra]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Oracle]:[{key:"api_key",label:"API Key",type:"password",required:!0}],[d.Cl.Snowflake]:[{key:"api_key",label:"Snowflake API Key / JWT Key for Authentication",type:"password",required:!0},{key:"api_base",label:"Snowflake API Endpoint",placeholder:"https://1234567890.snowflakecomputing.com/api/v2/cortex/inference:complete",tooltip:"Enter the full endpoint with path here. Example: https://1234567890.snowflakecomputing.com/api/v2/cortex/inference:complete",required:!0}],[d.Cl.Infinity]:[{key:"api_base",label:"API Base",placeholder:"http://localhost:7997"}],[d.Cl.FalAI]:[{key:"api_key",label:"API Key",type:"password",required:!0}]};var A=e=>{let{selectedProvider:l,uploadProps:t}=e,r=d.Cl[l],o=f.Z.useFormInstance(),i=a.useMemo(()=>S[r]||[],[r]),n={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;console.log("Setting field value from JSON, length: ".concat(l.length)),o.setFieldsValue({vertex_credentials:l}),console.log("Form values after setting:",o.getFieldsValue())}},l.readAsText(e)}return!1},onChange(e){console.log("Upload onChange triggered in ProviderSpecificFields"),console.log("Current form values:",o.getFieldsValue()),"uploading"!==e.file.status&&console.log(e.file,e.fileList)}};return(0,s.jsx)(s.Fragment,{children:i.map(e=>{var l;return(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(f.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,s.jsx)(v.default,{placeholder:e.placeholder,defaultValue:e.defaultValue,children:null===(l=e.options)||void 0===l?void 0:l.map(e=>(0,s.jsx)(v.default.Option,{value:e,children:e},e))}):"upload"===e.type?(0,s.jsx)(N.default,{...n,onChange:l=>{(null==t?void 0:t.onChange)&&t.onChange(l),setTimeout(()=>{let l=o.getFieldValue(e.key);console.log("".concat(e.key," value after upload:"),JSON.stringify(l))},500)},children:(0,s.jsx)(y.ZP,{icon:(0,s.jsx)(Z.Z,{}),children:"Click to Upload"})}):(0,s.jsx)(b.o,{placeholder:e.placeholder,type:"password"===e.type?"password":"text",defaultValue:e.defaultValue})}),"vertex_credentials"===e.key&&(0,s.jsx)(w.Z,{children:(0,s.jsx)(k.Z,{children:(0,s.jsx)(b.x,{className:"mb-3 mt-1",children:"Give a gcp service account(.json file)"})})}),"base_model"===e.key&&(0,s.jsxs)(w.Z,{children:[(0,s.jsx)(k.Z,{span:10}),(0,s.jsx)(k.Z,{span:10,children:(0,s.jsxs)(b.x,{className:"mb-2",children:["The actual model your azure deployment uses. Used for accurate cost tracking. Select name from"," ",(0,s.jsx)(C,{href:"https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json",target:"_blank",children:"here"})]})})]})]},e.key)})})},I=t(31283);let{Title:E,Link:P}=g.default;var M=e=>{let{isVisible:l,onCancel:t,onAddCredential:r,onUpdateCredential:o,uploadProps:i,addOrEdit:n,existingCredential:c}=e,[m]=f.Z.useForm(),[u,h]=(0,a.useState)(d.Cl.OpenAI),[p,x]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{c&&(m.setFieldsValue({credential_name:c.credential_name,custom_llm_provider:c.credential_info.custom_llm_provider,api_base:c.credential_values.api_base,api_version:c.credential_values.api_version,base_model:c.credential_values.base_model,api_key:c.credential_values.api_key}),h(c.credential_info.custom_llm_provider))},[c]),(0,s.jsx)(j.Z,{title:"add"===n?"Add New Credential":"Edit Credential",visible:l,onCancel:()=>{t(),m.resetFields()},footer:null,width:600,children:(0,s.jsxs)(f.Z,{form:m,onFinish:e=>{let l=Object.entries(e).reduce((e,l)=>{let[t,s]=l;return""!==s&&null!=s&&(e[t]=s),e},{});"add"===n?r(l):o(l),m.resetFields()},layout:"vertical",children:[(0,s.jsx)(f.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,s.jsx)(I.o,{placeholder:"Enter a friendly name for these credentials",disabled:null!=c&&!!c.credential_name})}),(0,s.jsx)(f.Z.Item,{rules:[{required:!0,message:"Required"}],label:"Provider:",name:"custom_llm_provider",tooltip:"Helper to auto-populate provider specific fields",children:(0,s.jsx)(v.default,{showSearch:!0,onChange:e=>{h(e),m.setFieldValue("custom_llm_provider",e)},children:Object.entries(d.Cl).map(e=>{let[l,t]=e;return(0,s.jsx)(v.default.Option,{value:l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("img",{src:d.cd[t],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,s=l.parentElement;if(s){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=t.charAt(0),s.replaceChild(e,l)}}}),(0,s.jsx)("span",{children:t})]})},l)})})}),(0,s.jsx)(A,{selectedProvider:u,uploadProps:i}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(_.Z,{title:"Get help on our github",children:(0,s.jsx)(P,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(y.ZP,{onClick:()=>{t(),m.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(y.ZP,{htmlType:"submit",children:"add"===n?"Add Credential":"Update Credential"})]})]})]})})},F=t(16312),L=t(88532),T=e=>{let{isVisible:l,onCancel:t,onConfirm:r,credentialName:o}=e,[i,n]=(0,a.useState)(""),d=i===o,c=()=>{n(""),t()};return(0,s.jsx)(j.Z,{title:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(L.Z,{className:"h-6 w-6 text-red-600 mr-2"}),"Delete Credential"]}),open:l,footer:null,onCancel:c,closable:!0,destroyOnClose:!0,maskClosable:!1,children:(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,s.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,s.jsx)(L.Z,{className:"h-5 w-5"})}),(0,s.jsx)("div",{children:(0,s.jsx)("p",{className:"text-base font-medium text-red-600",children:"This action cannot be undone and may break existing integrations."})})]}),(0,s.jsxs)("div",{className:"mb-5",children:[(0,s.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,s.jsxs)("span",{className:"underline italic",children:["'",o,"'"]})," to confirm deletion:"]}),(0,s.jsx)("input",{type:"text",value:i,onChange:e=>n(e.target.value),placeholder:"Enter credential name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]}),(0,s.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,s.jsx)(F.z,{onClick:c,variant:"secondary",className:"mr-2",children:"Cancel"}),(0,s.jsx)(F.z,{onClick:()=>{d&&(n(""),r())},color:"red",className:"focus:ring-red-500",disabled:!d,children:"Delete Credential"})]})]})})},R=e=>{let{accessToken:l,uploadProps:t,credentialList:r,fetchCredentials:o}=e,[i,d]=(0,a.useState)(!1),[m,u]=(0,a.useState)(!1),[g,j]=(0,a.useState)(null),[v,_]=(0,a.useState)(null),[y]=f.Z.useForm(),b=["credential_name","custom_llm_provider"],N=async e=>{if(!l)return;let t=Object.entries(e).filter(e=>{let[l]=e;return!b.includes(l)}).reduce((e,l)=>{let[t,s]=l;return{...e,[t]:s}},{}),s={credential_name:e.credential_name,credential_values:t,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,n.credentialUpdateCall)(l,e.credential_name,s),c.Z.success("Credential updated successfully"),u(!1),o(l)},w=async e=>{if(!l)return;let t=Object.entries(e).filter(e=>{let[l]=e;return!b.includes(l)}).reduce((e,l)=>{let[t,s]=l;return{...e,[t]:s}},{}),s={credential_name:e.credential_name,credential_values:t,credential_info:{custom_llm_provider:e.custom_llm_provider}};await (0,n.credentialCreateCall)(l,s),c.Z.success("Credential added successfully"),d(!1),o(l)};(0,a.useEffect)(()=>{l&&o(l)},[l]);let k=e=>{let l={openai:"blue",azure:"indigo",anthropic:"purple",default:"gray"},t=l[e.toLowerCase()]||l.default;return(0,s.jsx)(h.Ct,{color:t,size:"xs",children:e})},Z=async e=>{l&&(await (0,n.credentialDeleteCall)(l,e),c.Z.success("Credential deleted successfully"),_(null),o(l))},C=e=>{_(e)};return(0,s.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,s.jsx)(h.xv,{children:"Configured credentials for different AI providers. Add and manage your API credentials."})}),(0,s.jsx)(h.Zb,{children:(0,s.jsxs)(h.iA,{children:[(0,s.jsx)(h.ss,{children:(0,s.jsxs)(h.SC,{children:[(0,s.jsx)(h.xs,{children:"Credential Name"}),(0,s.jsx)(h.xs,{children:"Provider"}),(0,s.jsx)(h.xs,{children:"Description"})]})}),(0,s.jsx)(h.RM,{children:r&&0!==r.length?r.map((e,l)=>{var t,a;return(0,s.jsxs)(h.SC,{children:[(0,s.jsx)(h.pj,{children:e.credential_name}),(0,s.jsx)(h.pj,{children:k((null===(t=e.credential_info)||void 0===t?void 0:t.custom_llm_provider)||"-")}),(0,s.jsx)(h.pj,{children:(null===(a=e.credential_info)||void 0===a?void 0:a.description)||"-"}),(0,s.jsxs)(h.pj,{children:[(0,s.jsx)(h.zx,{icon:p.Z,variant:"light",size:"sm",onClick:()=>{j(e),u(!0)}}),(0,s.jsx)(h.zx,{icon:x.Z,variant:"light",size:"sm",onClick:()=>C(e.credential_name)})]})]},l)}):(0,s.jsx)(h.SC,{children:(0,s.jsx)(h.pj,{colSpan:4,className:"text-center py-4 text-gray-500",children:"No credentials configured"})})})]})}),(0,s.jsx)(h.zx,{onClick:()=>d(!0),className:"mt-4",children:"Add Credential"}),i&&(0,s.jsx)(M,{onAddCredential:w,isVisible:i,onCancel:()=>d(!1),uploadProps:t,addOrEdit:"add",onUpdateCredential:N,existingCredential:null}),m&&(0,s.jsx)(M,{onAddCredential:w,isVisible:m,existingCredential:g,onUpdateCredential:N,uploadProps:t,onCancel:()=>u(!1),addOrEdit:"edit"}),v&&(0,s.jsx)(T,{isVisible:!0,onCancel:()=>{_(null)},onConfirm:()=>Z(v),credentialName:v})]})};let O=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)||"-"};var V=t(47323),D=t(12485),q=t(18135),z=t(35242),B=t(29706),K=t(77991),U=t(23628),G=t(33293),H=t(20831),W=t(12514),Y=t(49566),J=t(96761),$=t(24199),Q=t(10900),X=t(45589),ee=t(64482),el=t(15424);let{Title:et,Link:es}=g.default;var ea=e=>{let{isVisible:l,onCancel:t,onAddCredential:a,existingCredential:r,setIsCredentialModalOpen:o}=e,[i]=f.Z.useForm();return console.log("existingCredential in add credentials tab: ".concat(JSON.stringify(r))),(0,s.jsx)(j.Z,{title:"Reuse Credentials",visible:l,onCancel:()=>{t(),i.resetFields()},footer:null,width:600,children:(0,s.jsxs)(f.Z,{form:i,onFinish:e=>{a(e),i.resetFields(),o(!1)},layout:"vertical",children:[(0,s.jsx)(f.Z.Item,{label:"Credential Name:",name:"credential_name",rules:[{required:!0,message:"Credential name is required"}],initialValue:null==r?void 0:r.credential_name,children:(0,s.jsx)(I.o,{placeholder:"Enter a friendly name for these credentials"})}),Object.entries((null==r?void 0:r.credential_values)||{}).map(e=>{let[l,t]=e;return(0,s.jsx)(f.Z.Item,{label:l,name:l,initialValue:t,children:(0,s.jsx)(I.o,{placeholder:"Enter ".concat(l),disabled:!0})},l)}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(_.Z,{title:"Get help on our github",children:(0,s.jsx)(es,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)(y.ZP,{onClick:()=>{t(),i.resetFields()},style:{marginRight:10},children:"Cancel"}),(0,s.jsx)(y.ZP,{htmlType:"submit",children:"Reuse Credentials"})]})]})]})})},er=t(63709),eo=t(45246),ei=t(96473);let{Text:en}=g.default;var ed=e=>{let{form:l,showCacheControl:t,onCacheControlChange:a}=e,r=e=>{let t=l.getFieldValue("litellm_extra_params");try{let s=t?JSON.parse(t):{};e.length>0?s.cache_control_injection_points=e:delete s.cache_control_injection_points,Object.keys(s).length>0?l.setFieldValue("litellm_extra_params",JSON.stringify(s,null,2)):l.setFieldValue("litellm_extra_params","")}catch(e){console.error("Error updating cache control points:",e)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Z.Item,{label:"Cache Control Injection Points",name:"cache_control",valuePropName:"checked",className:"mb-4",tooltip:"Tell litellm where to inject cache control checkpoints. You can specify either by role (to apply to all messages of that role) or by specific message index.",children:(0,s.jsx)(er.Z,{onChange:a,className:"bg-gray-600"})}),t&&(0,s.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,s.jsx)(en,{className:"text-sm text-gray-500 block mb-4",children:"Providers like Anthropic, Bedrock API require users to specify where to inject cache control checkpoints, litellm can automatically add them for you as a cost saving feature."}),(0,s.jsx)(f.Z.List,{name:"cache_control_injection_points",initialValue:[{location:"message"}],children:(e,t)=>{let{add:a,remove:o}=t;return(0,s.jsxs)(s.Fragment,{children:[e.map((t,a)=>(0,s.jsxs)("div",{className:"flex items-center mb-4 gap-4",children:[(0,s.jsx)(f.Z.Item,{...t,label:"Type",name:[t.name,"location"],initialValue:"message",className:"mb-0",style:{width:"180px"},children:(0,s.jsx)(v.default,{disabled:!0,options:[{value:"message",label:"Message"}]})}),(0,s.jsx)(f.Z.Item,{...t,label:"Role",name:[t.name,"role"],className:"mb-0",style:{width:"180px"},tooltip:"LiteLLM will mark all messages of this role as cacheable",children:(0,s.jsx)(v.default,{placeholder:"Select a role",allowClear:!0,options:[{value:"user",label:"User"},{value:"system",label:"System"},{value:"assistant",label:"Assistant"}],onChange:()=>{r(l.getFieldValue("cache_control_points"))}})}),(0,s.jsx)(f.Z.Item,{...t,label:"Index",name:[t.name,"index"],className:"mb-0",style:{width:"180px"},tooltip:"(Optional) If set litellm will mark the message at this index as cacheable",children:(0,s.jsx)($.Z,{type:"number",placeholder:"Optional",step:1,min:0,onChange:()=>{r(l.getFieldValue("cache_control_points"))}})}),e.length>1&&(0,s.jsx)(eo.Z,{className:"text-red-500 cursor-pointer text-lg ml-12",onClick:()=>{o(t.name),setTimeout(()=>{r(l.getFieldValue("cache_control_points"))},0)}})]},t.key)),(0,s.jsx)(f.Z.Item,{children:(0,s.jsxs)("button",{type:"button",className:"flex items-center justify-center w-full border border-dashed border-gray-300 py-2 px-4 text-gray-600 hover:text-blue-600 hover:border-blue-300 transition-all rounded",onClick:()=>a(),children:[(0,s.jsx)(ei.Z,{className:"mr-2"}),"Add Injection Point"]})})]})}})]})]})},ec=t(30401),em=t(78867),eu=t(59872),eh=t(51601),ep=t(44851),ex=t(67960),eg=t(20577),ef=t(70464),ej=t(26349),ev=t(92280);let{TextArea:e_}=ee.default,{Panel:ey}=ep.default;var eb=e=>{let{modelInfo:l,value:t,onChange:r}=e,[o,i]=(0,a.useState)([]),[n,d]=(0,a.useState)(!1),[c,m]=(0,a.useState)([]);(0,a.useEffect)(()=>{if(null==t?void 0:t.routes){let e=t.routes.map((e,l)=>({id:e.id||"route-".concat(l,"-").concat(Date.now()),model:e.name||e.model||"",utterances:e.utterances||[],description:e.description||"",score_threshold:e.score_threshold||.5}));i(e),m(e.map(e=>e.id))}else i([]),m([])},[t]);let u=e=>{let l=o.filter(l=>l.id!==e);i(l),p(l),m(l=>l.filter(l=>l!==e))},h=(e,l,t)=>{let s=o.map(s=>s.id===e?{...s,[l]:t}:s);i(s),p(s)},p=e=>{let l={routes:e.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))};null==r||r(l)},x=l.map(e=>({value:e.model_group,label:e.model_group}));return(0,s.jsxs)("div",{className:"w-full max-w-none",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6 w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(ev.x,{className:"text-lg font-semibold",children:"Routes Configuration"}),(0,s.jsx)(_.Z,{title:"Configure routing logic to automatically select the best model based on user input patterns",children:(0,s.jsx)(el.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(y.ZP,{type:"primary",icon:(0,s.jsx)(ei.Z,{}),onClick:()=>{let e="route-".concat(Date.now()),l=[...o,{id:e,model:"",utterances:[],description:"",score_threshold:.5}];i(l),p(l),m(l=>[...l,e])},className:"bg-blue-600 hover:bg-blue-700",children:"Add Route"})]}),0===o.length?(0,s.jsx)("div",{className:"text-center py-12 text-gray-500 bg-gray-50 rounded-lg border-2 border-dashed border-gray-200 mb-6",children:(0,s.jsx)(ev.x,{children:"No routes configured. Click “Add Route” to get started."})}):(0,s.jsx)("div",{className:"space-y-3 mb-6 w-full",children:o.map((e,l)=>(0,s.jsx)(ex.Z,{className:"border border-gray-200 shadow-sm w-full",bodyStyle:{padding:0},children:(0,s.jsx)(ep.default,{ghost:!0,expandIcon:e=>{let{isActive:l}=e;return(0,s.jsx)(ef.Z,{rotate:l?180:0})},activeKey:c,onChange:e=>m(Array.isArray(e)?e:[e].filter(Boolean)),items:[{key:e.id,label:(0,s.jsxs)("div",{className:"flex justify-between items-center py-2",children:[(0,s.jsxs)(ev.x,{className:"font-medium text-base",children:["Route ",l+1,": ",e.model||"Unnamed"]}),(0,s.jsx)(y.ZP,{type:"text",danger:!0,icon:(0,s.jsx)(ej.Z,{}),onClick:l=>{l.stopPropagation(),u(e.id)},className:"mr-2"})]}),children:(0,s.jsxs)("div",{className:"px-6 pb-6 w-full",children:[(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsx)(ev.x,{className:"text-sm font-medium mb-2 block",children:"Model"}),(0,s.jsx)(v.default,{value:e.model,onChange:l=>h(e.id,"model",l),placeholder:"Select model",showSearch:!0,style:{width:"100%"},options:x})]}),(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsx)(ev.x,{className:"text-sm font-medium mb-2 block",children:"Description"}),(0,s.jsx)(e_,{value:e.description,onChange:l=>h(e.id,"description",l.target.value),placeholder:"Describe when this route should be used...",rows:2,style:{width:"100%"}})]}),(0,s.jsxs)("div",{className:"mb-4 w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(ev.x,{className:"text-sm font-medium",children:"Score Threshold"}),(0,s.jsx)(_.Z,{title:"Minimum similarity score to route to this model (0-1)",children:(0,s.jsx)(el.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(eg.Z,{value:e.score_threshold,onChange:l=>h(e.id,"score_threshold",l||0),min:0,max:1,step:.1,style:{width:"100%"},placeholder:"0.5"})]}),(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(ev.x,{className:"text-sm font-medium",children:"Example Utterances"}),(0,s.jsx)(_.Z,{title:"Training examples for this route. Type an utterance and press Enter to add it.",children:(0,s.jsx)(el.Z,{className:"text-gray-400"})})]}),(0,s.jsx)(ev.x,{className:"text-xs text-gray-500 mb-2",children:"Type an utterance and press Enter to add it. You can also paste multiple lines."}),(0,s.jsx)(v.default,{mode:"tags",value:e.utterances,onChange:l=>h(e.id,"utterances",l),placeholder:"Type an utterance and press Enter...",style:{width:"100%"},tokenSeparators:["\n"],maxTagCount:"responsive",allowClear:!0})]})]})}]})},e.id))}),(0,s.jsxs)("div",{className:"border-t pt-6 w-full",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4 w-full",children:[(0,s.jsx)(ev.x,{className:"text-lg font-semibold",children:"JSON Preview"}),(0,s.jsx)(y.ZP,{type:"link",onClick:()=>d(!n),className:"text-blue-600 p-0",children:n?"Hide":"Show"})]}),n&&(0,s.jsx)(ex.Z,{className:"bg-gray-50 w-full",children:(0,s.jsx)("pre",{className:"text-sm overflow-auto max-h-64 w-full",children:JSON.stringify({routes:o.map(e=>({name:e.model,utterances:e.utterances,description:e.description,score_threshold:e.score_threshold}))},null,2)})})]})]})},eN=e=>{let{isVisible:l,onCancel:t,onSuccess:r,modelData:o,accessToken:i,userRole:d}=e,[m]=f.Z.useForm(),[u,h]=(0,a.useState)(!1),[p,x]=(0,a.useState)([]),[g,_]=(0,a.useState)([]),[N,w]=(0,a.useState)(!1),[k,Z]=(0,a.useState)(!1),[C,S]=(0,a.useState)(null);(0,a.useEffect)(()=>{l&&o&&A()},[l,o]),(0,a.useEffect)(()=>{let e=async()=>{if(i)try{let e=await (0,n.modelAvailableCall)(i,"","",!1,null,!0,!0);x(e.data.map(e=>e.id))}catch(e){console.error("Error fetching model access groups:",e)}},t=async()=>{if(i)try{let e=await (0,eh.p)(i);_(e)}catch(e){console.error("Error fetching model info:",e)}};l&&(e(),t())},[l,i]);let A=()=>{try{var e,l,t,s,a,r;let i=null;(null===(e=o.litellm_params)||void 0===e?void 0:e.auto_router_config)&&(i="string"==typeof o.litellm_params.auto_router_config?JSON.parse(o.litellm_params.auto_router_config):o.litellm_params.auto_router_config),S(i),m.setFieldsValue({auto_router_name:o.model_name,auto_router_default_model:(null===(l=o.litellm_params)||void 0===l?void 0:l.auto_router_default_model)||"",auto_router_embedding_model:(null===(t=o.litellm_params)||void 0===t?void 0:t.auto_router_embedding_model)||"",model_access_group:(null===(s=o.model_info)||void 0===s?void 0:s.access_groups)||[]});let n=new Set(g.map(e=>e.model_group));w(!n.has(null===(a=o.litellm_params)||void 0===a?void 0:a.auto_router_default_model)),Z(!n.has(null===(r=o.litellm_params)||void 0===r?void 0:r.auto_router_embedding_model))}catch(e){console.error("Error parsing auto router config:",e),c.Z.fromBackend("Error loading auto router configuration")}},I=async()=>{try{h(!0);let e=await m.validateFields(),l={...o.litellm_params,auto_router_config:JSON.stringify(C),auto_router_default_model:e.auto_router_default_model,auto_router_embedding_model:e.auto_router_embedding_model||void 0},s={...o.model_info,access_groups:e.model_access_group||[]},a={model_name:e.auto_router_name,litellm_params:l,model_info:s};await (0,n.modelPatchUpdateCall)(i,a,o.model_info.id);let d={...o,model_name:e.auto_router_name,litellm_params:l,model_info:s};c.Z.success("Auto router configuration updated successfully"),r(d),t()}catch(e){console.error("Error updating auto router:",e),c.Z.fromBackend("Failed to update auto router configuration")}finally{h(!1)}},E=g.map(e=>({value:e.model_group,label:e.model_group}));return(0,s.jsx)(j.Z,{title:"Edit Auto Router Configuration",open:l,onCancel:t,footer:[(0,s.jsx)(y.ZP,{onClick:t,children:"Cancel"},"cancel"),(0,s.jsx)(y.ZP,{loading:u,onClick:I,children:"Save Changes"},"submit")],width:1e3,destroyOnClose:!0,children:(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(b.x,{className:"text-gray-600",children:"Edit the auto router configuration including routing logic, default models, and access settings."}),(0,s.jsxs)(f.Z,{form:m,layout:"vertical",className:"space-y-4",children:[(0,s.jsx)(f.Z.Item,{label:"Auto Router Name",name:"auto_router_name",rules:[{required:!0,message:"Auto router name is required"}],children:(0,s.jsx)(b.o,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,s.jsx)("div",{className:"w-full",children:(0,s.jsx)(eb,{modelInfo:g,value:C,onChange:e=>{S(e)}})}),(0,s.jsx)(f.Z.Item,{label:"Default Model",name:"auto_router_default_model",rules:[{required:!0,message:"Default model is required"}],children:(0,s.jsx)(v.default,{placeholder:"Select a default model",onChange:e=>{w("custom"===e)},options:[...E,{value:"custom",label:"Enter custom model name"}],showSearch:!0})}),(0,s.jsx)(f.Z.Item,{label:"Embedding Model",name:"auto_router_embedding_model",children:(0,s.jsx)(v.default,{placeholder:"Select an embedding model (optional)",onChange:e=>{Z("custom"===e)},options:[...E,{value:"custom",label:"Enter custom model name"}],showSearch:!0,allowClear:!0})}),"Admin"===d&&(0,s.jsx)(f.Z.Item,{label:"Model Access Groups",name:"model_access_group",tooltip:"Control who can access this auto router",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:p.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})]})]})})};function ew(e){var l,t,r,m,u,h,p,g,b,N,w,k,Z,C,S,A,I,E,P,M,F,L,T,R,V,U,G,et,es,er,eo,ei;let{modelId:en,onClose:eh,modelData:ep,accessToken:ex,userID:eg,userRole:ef,editModel:ej,setEditModalVisible:ev,setSelectedModel:e_,onModelUpdate:ey,modelAccessGroups:eb}=e,[ew]=f.Z.useForm(),[ek,eZ]=(0,a.useState)(null),[eC,eS]=(0,a.useState)(!1),[eA,eI]=(0,a.useState)(!1),[eE,eP]=(0,a.useState)(!1),[eM,eF]=(0,a.useState)(!1),[eL,eT]=(0,a.useState)(!1),[eR,eO]=(0,a.useState)(null),[eV,eD]=(0,a.useState)(!1),[eq,ez]=(0,a.useState)({}),[eB,eK]=(0,a.useState)(!1),[eU,eG]=(0,a.useState)([]),[eH,eW]=(0,a.useState)({}),eY=("Admin"===ef||(null==ep?void 0:null===(l=ep.model_info)||void 0===l?void 0:l.created_by)===eg)&&(null==ep?void 0:null===(t=ep.model_info)||void 0===t?void 0:t.db_model),eJ=(null==ep?void 0:null===(r=ep.litellm_params)||void 0===r?void 0:r.auto_router_config)!=null,e$=(null==ep?void 0:null===(m=ep.litellm_params)||void 0===m?void 0:m.litellm_credential_name)!=null&&(null==ep?void 0:null===(u=ep.litellm_params)||void 0===u?void 0:u.litellm_credential_name)!=void 0;console.log("usingExistingCredential, ",e$),console.log("modelData.litellm_params.litellm_credential_name, ",null==ep?void 0:null===(h=ep.litellm_params)||void 0===h?void 0:h.litellm_credential_name),console.log("tagsList, ",null===(p=ep.litellm_params)||void 0===p?void 0:p.tags),(0,a.useEffect)(()=>{let e=async()=>{var e,l,t,s,a,r,o;if(!ex)return;let i=await (0,n.modelInfoV1Call)(ex,en);console.log("modelInfoResponse, ",i);let d=i.data[0];d&&!d.litellm_model_name&&(d={...d,litellm_model_name:null!==(o=null!==(r=null!==(a=null==d?void 0:null===(l=d.litellm_params)||void 0===l?void 0:l.litellm_model_name)&&void 0!==a?a:null==d?void 0:null===(t=d.litellm_params)||void 0===t?void 0:t.model)&&void 0!==r?r:null==d?void 0:null===(s=d.model_info)||void 0===s?void 0:s.key)&&void 0!==o?o:null}),eZ(d),(null==d?void 0:null===(e=d.litellm_params)||void 0===e?void 0:e.cache_control_injection_points)&&eD(!0)},l=async()=>{if(ex)try{let e=(await (0,n.getGuardrailsList)(ex)).guardrails.map(e=>e.guardrail_name);eG(e)}catch(e){console.error("Failed to fetch guardrails:",e)}},t=async()=>{if(ex)try{let e=await (0,n.tagListCall)(ex);eW(e)}catch(e){console.error("Failed to fetch tags:",e)}};(async()=>{if(console.log("accessToken, ",ex),!ex||e$)return;let e=await (0,n.credentialGetCall)(ex,null,en);console.log("existingCredentialResponse, ",e),eO({credential_name:e.credential_name,credential_values:e.credential_values,credential_info:e.credential_info})})(),e(),l(),t()},[ex,en]);let eQ=async e=>{var l;if(console.log("values, ",e),!ex)return;let t={credential_name:e.credential_name,model_id:en,credential_info:{custom_llm_provider:null===(l=ek.litellm_params)||void 0===l?void 0:l.custom_llm_provider}};c.Z.info("Storing credential.."),console.log("credentialResponse, ",await (0,n.credentialCreateCall)(ex,t)),c.Z.success("Credential stored successfully")},eX=async e=>{try{var l;let t;if(!ex)return;eF(!0),console.log("values.model_name, ",e.model_name);let s={...ek.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,tags:e.tags};e.guardrails&&(s.guardrails=e.guardrails),e.cache_control&&(null===(l=e.cache_control_injection_points)||void 0===l?void 0:l.length)>0?s.cache_control_injection_points=e.cache_control_injection_points:delete s.cache_control_injection_points;try{t=e.model_info?JSON.parse(e.model_info):ep.model_info,e.model_access_group&&(t={...t,access_groups:e.model_access_group})}catch(e){c.Z.fromBackend("Invalid JSON in Model Info");return}let a={model_name:e.model_name,litellm_params:s,model_info:t};await (0,n.modelPatchUpdateCall)(ex,a,en);let r={...ek,model_name:e.model_name,litellm_model_name:e.litellm_model_name,litellm_params:s,model_info:t};eZ(r),ey&&ey(r),c.Z.success("Model settings updated successfully"),eP(!1),eT(!1)}catch(e){console.error("Error updating model:",e),c.Z.fromBackend("Failed to update model settings")}finally{eF(!1)}};if(!ep)return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)(H.Z,{icon:Q.Z,variant:"light",onClick:eh,className:"mb-4",children:"Back to Models"}),(0,s.jsx)(i.Z,{children:"Model not found"})]});let e0=async()=>{try{if(!ex)return;await (0,n.modelDeleteCall)(ex,en),c.Z.success("Model deleted successfully"),ey&&ey({deleted:!0,model_info:{id:en}}),eh()}catch(e){console.error("Error deleting the model:",e),c.Z.fromBackend("Failed to delete model")}},e1=async(e,l)=>{await (0,eu.vQ)(e)&&(ez(e=>({...e,[l]:!0})),setTimeout(()=>{ez(e=>({...e,[l]:!1}))},2e3))};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(H.Z,{icon:Q.Z,variant:"light",onClick:eh,className:"mb-4",children:"Back to Models"}),(0,s.jsxs)(J.Z,{children:["Public Model Name: ",O(ep)]}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(i.Z,{className:"text-gray-500 font-mono",children:ep.model_info.id}),(0,s.jsx)(y.ZP,{type:"text",size:"small",icon:eq["model-id"]?(0,s.jsx)(ec.Z,{size:12}):(0,s.jsx)(em.Z,{size:12}),onClick:()=>e1(ep.model_info.id,"model-id"),className:"left-2 z-10 transition-all duration-200 ".concat(eq["model-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:["Admin"===ef&&(0,s.jsx)(H.Z,{icon:X.Z,variant:"secondary",onClick:()=>eI(!0),className:"flex items-center",children:"Re-use Credentials"}),eY&&(0,s.jsx)(H.Z,{icon:x.Z,variant:"secondary",onClick:()=>eS(!0),className:"flex items-center",children:"Delete Model"})]})]}),(0,s.jsxs)(q.Z,{children:[(0,s.jsxs)(z.Z,{className:"mb-6",children:[(0,s.jsx)(D.Z,{children:"Overview"}),(0,s.jsx)(D.Z,{children:"Raw JSON"})]}),(0,s.jsxs)(K.Z,{children:[(0,s.jsxs)(B.Z,{children:[(0,s.jsxs)(o.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6 mb-6",children:[(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(i.Z,{children:"Provider"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center space-x-2",children:[ep.provider&&(0,s.jsx)("img",{src:(0,d.dr)(ep.provider).logo,alt:"".concat(ep.provider," logo"),className:"w-4 h-4",onError:e=>{let l=e.target,t=l.parentElement;if(t){var s;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===(s=ep.provider)||void 0===s?void 0:s.charAt(0))||"-",t.replaceChild(e,l)}}}),(0,s.jsx)(J.Z,{children:ep.provider||"Not Set"})]})]}),(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(i.Z,{children:"LiteLLM Model"}),(0,s.jsx)("div",{className:"mt-2 overflow-hidden",children:(0,s.jsx)(_.Z,{title:ep.litellm_model_name||"Not Set",children:(0,s.jsx)("div",{className:"break-all text-sm font-medium leading-relaxed cursor-pointer",children:ep.litellm_model_name||"Not Set"})})})]}),(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(i.Z,{children:"Pricing"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(i.Z,{children:["Input: $",ep.input_cost,"/1M tokens"]}),(0,s.jsxs)(i.Z,{children:["Output: $",ep.output_cost,"/1M tokens"]})]})]})]}),(0,s.jsxs)("div",{className:"mb-6 text-sm text-gray-500 flex items-center gap-x-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.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"," ",ep.model_info.created_at?new Date(ep.model_info.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Not Set"]}),(0,s.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.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 ",ep.model_info.created_by||"Not Set"]})]}),(0,s.jsxs)(W.Z,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(J.Z,{children:"Model Settings"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[eJ&&eY&&!eL&&(0,s.jsx)(H.Z,{variant:"primary",onClick:()=>eK(!0),className:"flex items-center",children:"Edit Auto Router"}),eY?!eL&&(0,s.jsx)(H.Z,{variant:"secondary",onClick:()=>eT(!0),className:"flex items-center",children:"Edit Model"}):(0,s.jsx)(_.Z,{title:"Only DB models can be edited. You must be an admin or the creator of the model to edit it.",children:(0,s.jsx)(el.Z,{})})]})]}),ek?(0,s.jsx)(f.Z,{form:ew,onFinish:eX,initialValues:{model_name:ek.model_name,litellm_model_name:ek.litellm_model_name,api_base:ek.litellm_params.api_base,custom_llm_provider:ek.litellm_params.custom_llm_provider,organization:ek.litellm_params.organization,tpm:ek.litellm_params.tpm,rpm:ek.litellm_params.rpm,max_retries:ek.litellm_params.max_retries,timeout:ek.litellm_params.timeout,stream_timeout:ek.litellm_params.stream_timeout,input_cost:ek.litellm_params.input_cost_per_token?1e6*ek.litellm_params.input_cost_per_token:(null===(g=ek.model_info)||void 0===g?void 0:g.input_cost_per_token)*1e6||null,output_cost:(null===(b=ek.litellm_params)||void 0===b?void 0:b.output_cost_per_token)?1e6*ek.litellm_params.output_cost_per_token:(null===(N=ek.model_info)||void 0===N?void 0:N.output_cost_per_token)*1e6||null,cache_control:null!==(w=ek.litellm_params)&&void 0!==w&&!!w.cache_control_injection_points,cache_control_injection_points:(null===(k=ek.litellm_params)||void 0===k?void 0:k.cache_control_injection_points)||[],model_access_group:Array.isArray(null===(Z=ek.model_info)||void 0===Z?void 0:Z.access_groups)?ek.model_info.access_groups:[],guardrails:Array.isArray(null===(C=ek.litellm_params)||void 0===C?void 0:C.guardrails)?ek.litellm_params.guardrails:[],tags:Array.isArray(null===(S=ek.litellm_params)||void 0===S?void 0:S.tags)?ek.litellm_params.tags:[]},layout:"vertical",onValuesChange:()=>eP(!0),children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Model Name"}),eL?(0,s.jsx)(f.Z.Item,{name:"model_name",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter model name"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:ek.model_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"LiteLLM Model Name"}),eL?(0,s.jsx)(f.Z.Item,{name:"litellm_model_name",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter LiteLLM model name"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:ek.litellm_model_name})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Input Cost (per 1M tokens)"}),eL?(0,s.jsx)(f.Z.Item,{name:"input_cost",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter input cost"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==ek?void 0:null===(A=ek.litellm_params)||void 0===A?void 0:A.input_cost_per_token)?((null===(I=ek.litellm_params)||void 0===I?void 0:I.input_cost_per_token)*1e6).toFixed(4):(null==ek?void 0:null===(E=ek.model_info)||void 0===E?void 0:E.input_cost_per_token)?(1e6*ek.model_info.input_cost_per_token).toFixed(4):null})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Output Cost (per 1M tokens)"}),eL?(0,s.jsx)(f.Z.Item,{name:"output_cost",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter output cost"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null==ek?void 0:null===(P=ek.litellm_params)||void 0===P?void 0:P.output_cost_per_token)?(1e6*ek.litellm_params.output_cost_per_token).toFixed(4):(null==ek?void 0:null===(M=ek.model_info)||void 0===M?void 0:M.output_cost_per_token)?(1e6*ek.model_info.output_cost_per_token).toFixed(4):null})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"API Base"}),eL?(0,s.jsx)(f.Z.Item,{name:"api_base",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter API base"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(F=ek.litellm_params)||void 0===F?void 0:F.api_base)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Custom LLM Provider"}),eL?(0,s.jsx)(f.Z.Item,{name:"custom_llm_provider",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter custom LLM provider"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(L=ek.litellm_params)||void 0===L?void 0:L.custom_llm_provider)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Organization"}),eL?(0,s.jsx)(f.Z.Item,{name:"organization",className:"mb-0",children:(0,s.jsx)(Y.Z,{placeholder:"Enter organization"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(T=ek.litellm_params)||void 0===T?void 0:T.organization)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"TPM (Tokens per Minute)"}),eL?(0,s.jsx)(f.Z.Item,{name:"tpm",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter TPM"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(R=ek.litellm_params)||void 0===R?void 0:R.tpm)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"RPM (Requests per Minute)"}),eL?(0,s.jsx)(f.Z.Item,{name:"rpm",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter RPM"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(V=ek.litellm_params)||void 0===V?void 0:V.rpm)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Max Retries"}),eL?(0,s.jsx)(f.Z.Item,{name:"max_retries",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter max retries"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(U=ek.litellm_params)||void 0===U?void 0:U.max_retries)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Timeout (seconds)"}),eL?(0,s.jsx)(f.Z.Item,{name:"timeout",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter timeout"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(G=ek.litellm_params)||void 0===G?void 0:G.timeout)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Stream Timeout (seconds)"}),eL?(0,s.jsx)(f.Z.Item,{name:"stream_timeout",className:"mb-0",children:(0,s.jsx)($.Z,{placeholder:"Enter stream timeout"})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(et=ek.litellm_params)||void 0===et?void 0:et.stream_timeout)||"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Model Access Groups"}),eL?(0,s.jsx)(f.Z.Item,{name:"model_access_group",className:"mb-0",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:null==eb?void 0:eb.map(e=>({value:e,label:e}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(es=ek.model_info)||void 0===es?void 0:es.access_groups)?Array.isArray(ek.model_info.access_groups)?ek.model_info.access_groups.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:ek.model_info.access_groups.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:e},l))}):"No groups assigned":ek.model_info.access_groups:"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(i.Z,{className:"font-medium",children:["Guardrails",(0,s.jsx)(_.Z,{title:"Apply safety guardrails to this model to filter content or enforce policies",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(el.Z,{style:{marginLeft:"4px"}})})})]}),eL?(0,s.jsx)(f.Z.Item,{name:"guardrails",className:"mb-0",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing guardrails or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:eU.map(e=>({value:e,label:e}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(er=ek.litellm_params)||void 0===er?void 0:er.guardrails)?Array.isArray(ek.litellm_params.guardrails)?ek.litellm_params.guardrails.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:ek.litellm_params.guardrails.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100 text-green-800",children:e},l))}):"No guardrails assigned":ek.litellm_params.guardrails:"Not Set"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Tags"}),eL?(0,s.jsx)(f.Z.Item,{name:"tags",className:"mb-0",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing tags or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],maxTagCount:"responsive",allowClear:!0,style:{width:"100%"},options:Object.values(eH).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(eo=ek.litellm_params)||void 0===eo?void 0:eo.tags)?Array.isArray(ek.litellm_params.tags)?ek.litellm_params.tags.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:ek.litellm_params.tags.map((e,l)=>(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100 text-purple-800",children:e},l))}):"No tags assigned":ek.litellm_params.tags:"Not Set"})]}),eL?(0,s.jsx)(ed,{form:ew,showCacheControl:eV,onCacheControlChange:e=>eD(e)}):(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Cache Control"}),(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(null===(ei=ek.litellm_params)||void 0===ei?void 0:ei.cache_control_injection_points)?(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:"Enabled"}),(0,s.jsx)("div",{className:"mt-2",children:ek.litellm_params.cache_control_injection_points.map((e,l)=>(0,s.jsxs)("div",{className:"text-sm text-gray-600 mb-1",children:["Location: ",e.location,",",e.role&&(0,s.jsxs)("span",{children:[" Role: ",e.role]}),void 0!==e.index&&(0,s.jsxs)("span",{children:[" Index: ",e.index]})]},l))})]}):"Disabled"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Model Info"}),eL?(0,s.jsx)(f.Z.Item,{name:"model_info",className:"mb-0",children:(0,s.jsx)(ee.default.TextArea,{rows:4,placeholder:'{"gpt-4": 100, "claude-v1": 200}',defaultValue:JSON.stringify(ep.model_info,null,2)})}):(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:(0,s.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(ek.model_info,null,2)})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Team ID"}),(0,s.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:ep.model_info.team_id||"Not Set"})]})]}),eL&&(0,s.jsxs)("div",{className:"mt-6 flex justify-end gap-2",children:[(0,s.jsx)(H.Z,{variant:"secondary",onClick:()=>{ew.resetFields(),eP(!1),eT(!1)},children:"Cancel"}),(0,s.jsx)(H.Z,{variant:"primary",onClick:()=>ew.submit(),loading:eM,children:"Save Changes"})]})]})}):(0,s.jsx)(i.Z,{children:"Loading..."})]})]}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(W.Z,{children:(0,s.jsx)("pre",{className:"bg-gray-100 p-4 rounded text-xs overflow-auto",children:JSON.stringify(ep,null,2)})})})]})]}),eC&&(0,s.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,s.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,s.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,s.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,s.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),(0,s.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,s.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,s.jsx)("div",{className:"sm:flex sm:items-start",children:(0,s.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,s.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Model"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this model?"})})]})})}),(0,s.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,s.jsx)(y.ZP,{onClick:e0,className:"ml-2",danger:!0,children:"Delete"}),(0,s.jsx)(y.ZP,{onClick:()=>eS(!1),children:"Cancel"})]})]})]})}),eA&&!e$?(0,s.jsx)(ea,{isVisible:eA,onCancel:()=>eI(!1),onAddCredential:eQ,existingCredential:eR,setIsCredentialModalOpen:eI}):(0,s.jsx)(j.Z,{open:eA,onCancel:()=>eI(!1),title:"Using Existing Credential",children:(0,s.jsx)(i.Z,{children:ep.litellm_params.litellm_credential_name})}),(0,s.jsx)(eN,{isVisible:eB,onCancel:()=>eK(!1),onSuccess:e=>{eZ(e),ey&&ey(e)},modelData:ek||ep,accessToken:ex||"",userRole:ef||""})]})}var ek=t(58643),eZ=e=>{let{selectedProvider:l,providerModels:t,getPlaceholder:a}=e,r=f.Z.useFormInstance(),o=e=>{let t=e.target.value,s=(r.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?l===d.Cl.Azure?{public_name:t,litellm_model:"azure/".concat(t)}:{public_name:t,litellm_model:t}:e);r.setFieldsValue({model_mappings:s})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(f.Z.Item,{label:"LiteLLM Model Name(s)",tooltip:"The model name LiteLLM will send to the LLM API",className:"mb-0",children:[(0,s.jsx)(f.Z.Item,{name:"model",rules:[{required:!0,message:"Please enter ".concat(l===d.Cl.Azure?"a deployment name":"at least one model",".")}],noStyle:!0,children:l===d.Cl.Azure||l===d.Cl.OpenAI_Compatible||l===d.Cl.Ollama?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(b.o,{placeholder:a(l),onChange:l===d.Cl.Azure?e=>{let l=e.target.value,t=l?[{public_name:l,litellm_model:"azure/".concat(l)}]:[];r.setFieldsValue({model:l,model_mappings:t})}:void 0})}):t.length>0?(0,s.jsx)(v.default,{mode:"multiple",allowClear:!0,showSearch:!0,placeholder:"Select models",onChange:e=>{let t=Array.isArray(e)?e:[e];if(t.includes("all-wildcard"))r.setFieldsValue({model_name:void 0,model_mappings:[]});else if(JSON.stringify(r.getFieldValue("model"))!==JSON.stringify(t)){let e=t.map(e=>l===d.Cl.Azure?{public_name:e,litellm_model:"azure/".concat(e)}:{public_name:e,litellm_model:e});r.setFieldsValue({model:t,model_mappings:e})}},optionFilterProp:"children",filterOption:(e,l)=>{var t;return(null!==(t=null==l?void 0:l.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:[{label:"Custom Model Name (Enter below)",value:"custom"},{label:"All ".concat(l," Models (Wildcard)"),value:"all-wildcard"},...t.map(e=>({label:e,value:e}))],style:{width:"100%"}}):(0,s.jsx)(b.o,{placeholder:a(l)})}),(0,s.jsx)(f.Z.Item,{noStyle:!0,shouldUpdate:(e,l)=>e.model!==l.model,children:e=>{let{getFieldValue:t}=e,a=t("model")||[];return(Array.isArray(a)?a:[a]).includes("custom")&&(0,s.jsx)(f.Z.Item,{name:"custom_model_name",rules:[{required:!0,message:"Please enter a custom model name."}],className:"mt-2",children:(0,s.jsx)(b.o,{placeholder:l===d.Cl.Azure?"Enter Azure deployment name":"Enter custom model name",onChange:o})})}})]}),(0,s.jsxs)(w.Z,{children:[(0,s.jsx)(k.Z,{span:10}),(0,s.jsx)(k.Z,{span:14,children:(0,s.jsx)(b.x,{className:"mb-3 mt-1",children:l===d.Cl.Azure?"Your deployment name will be saved as the public model name, and LiteLLM will use 'azure/deployment-name' internally":"The model name LiteLLM will send to the LLM API"})})]})]})},eC=t(81915),eS=t(67187);let eA=e=>{let{content:l,children:t,width:r="auto",className:o=""}=e,[i,n]=(0,a.useState)(!1),[d,c]=(0,a.useState)("top"),m=(0,a.useRef)(null),u=()=>{if(m.current){let e=m.current.getBoundingClientRect(),l=e.top,t=window.innerHeight-e.bottom;l<300&&t>300?c("bottom"):c("top")}};return(0,s.jsxs)("div",{className:"relative inline-block",ref:m,children:[t||(0,s.jsx)(eS.Z,{className:"ml-1 text-gray-500 cursor-help",onMouseEnter:()=>{u(),n(!0)},onMouseLeave:()=>n(!1)}),i&&(0,s.jsxs)("div",{className:"absolute left-1/2 -translate-x-1/2 z-50 bg-black/90 text-white p-2 rounded-md text-sm font-normal shadow-lg ".concat(o),style:{["top"===d?"bottom":"top"]:"100%",width:r,marginBottom:"top"===d?"8px":"0",marginTop:"bottom"===d?"8px":"0"},children:[l,(0,s.jsx)("div",{className:"absolute left-1/2 -translate-x-1/2 w-0 h-0",style:{top:"top"===d?"100%":"auto",bottom:"bottom"===d?"100%":"auto",borderTop:"top"===d?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderBottom:"bottom"===d?"6px solid rgba(0, 0, 0, 0.9)":"6px solid transparent",borderLeft:"6px solid transparent",borderRight:"6px solid transparent"}})]})]})};var eI=()=>{let e=f.Z.useFormInstance(),[l,t]=(0,a.useState)(0),r=f.Z.useWatch("model",e)||[],o=Array.isArray(r)?r:[r],i=f.Z.useWatch("custom_model_name",e),n=!o.includes("all-wildcard"),c=f.Z.useWatch("custom_llm_provider",e);if((0,a.useEffect)(()=>{if(i&&o.includes("custom")){let l=(e.getFieldValue("model_mappings")||[]).map(e=>"custom"===e.public_name||"custom"===e.litellm_model?c===d.Cl.Azure?{public_name:i,litellm_model:"azure/".concat(i)}:{public_name:i,litellm_model:i}:e);e.setFieldValue("model_mappings",l),t(e=>e+1)}},[i,o,c,e]),(0,a.useEffect)(()=>{if(o.length>0&&!o.includes("all-wildcard")){let l=e.getFieldValue("model_mappings")||[];if(l.length!==o.length||!o.every(e=>l.some(l=>"custom"===e?"custom"===l.litellm_model||l.litellm_model===i:c===d.Cl.Azure?l.litellm_model==="azure/".concat(e):l.litellm_model===e))){let l=o.map(e=>"custom"===e&&i?c===d.Cl.Azure?{public_name:i,litellm_model:"azure/".concat(i)}:{public_name:i,litellm_model:i}:c===d.Cl.Azure?{public_name:e,litellm_model:"azure/".concat(e)}:{public_name:e,litellm_model:e});e.setFieldValue("model_mappings",l),t(e=>e+1)}}},[o,i,c,e]),!n)return null;let m=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mb-2 font-normal",children:"The name you specify in your API calls to LiteLLM Proxy"}),(0,s.jsxs)("div",{className:"mb-2 font-normal",children:[(0,s.jsx)("strong",{children:"Example:"})," If you name your public model"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"example-name"}),", and choose"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"openai/qwen-plus-latest"})," as the LiteLLM model"]}),(0,s.jsxs)("div",{className:"mb-2 font-normal",children:[(0,s.jsx)("strong",{children:"Usage:"})," You make an API call to the LiteLLM proxy with"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:'model = "example-name"'})]}),(0,s.jsxs)("div",{className:"font-normal",children:[(0,s.jsx)("strong",{children:"Result:"})," LiteLLM sends"," ",(0,s.jsx)("code",{className:"bg-gray-700 px-1 py-0.5 rounded text-xs",children:"qwen-plus-latest"})," to the provider"]})]}),u=(0,s.jsx)("div",{children:"The model name LiteLLM will send to the LLM API"}),h=[{title:(0,s.jsxs)("span",{className:"flex items-center",children:["Public Model Name",(0,s.jsx)(eA,{content:m,width:"500px"})]}),dataIndex:"public_name",key:"public_name",render:(l,t,a)=>(0,s.jsx)(I.o,{value:l,onChange:l=>{let t=[...e.getFieldValue("model_mappings")];t[a].public_name=l.target.value,e.setFieldValue("model_mappings",t)}})},{title:(0,s.jsxs)("span",{className:"flex items-center",children:["LiteLLM Model Name",(0,s.jsx)(eA,{content:u,width:"360px"})]}),dataIndex:"litellm_model",key:"litellm_model"}];return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(f.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",rules:[{required:!0,validator:async(e,l)=>{if(!l||0===l.length)throw Error("At least one model mapping is required");if(l.filter(e=>!e.public_name||""===e.public_name.trim()).length>0)throw Error("All model mappings must have valid public names")}}],children:(0,s.jsx)(eC.Z,{dataSource:e.getFieldValue("model_mappings"),columns:h,pagination:!1,size:"small"},l)})})},eE=t(26210),eP=t(90464);let{Link:eM}=g.default;var eF=e=>{let{showAdvancedSettings:l,setShowAdvancedSettings:t,teams:r,guardrailsList:o,tagsList:i}=e,[n]=f.Z.useForm(),[d,c]=a.useState(!1),[m,u]=a.useState("per_token"),[h,p]=a.useState(!1),x=(e,l)=>l&&(isNaN(Number(l))||0>Number(l))?Promise.reject("Please enter a valid positive number"):Promise.resolve(),g=(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,s.jsx)(s.Fragment,{children:(0,s.jsxs)(eE.UQ,{className:"mt-2 mb-4",children:[(0,s.jsx)(eE._m,{children:(0,s.jsx)("b",{children:"Advanced Settings"})}),(0,s.jsx)(eE.X1,{children:(0,s.jsxs)("div",{className:"bg-white rounded-lg",children:[(0,s.jsx)(f.Z.Item,{label:"Custom Pricing",name:"custom_pricing",valuePropName:"checked",className:"mb-4",children:(0,s.jsx)(er.Z,{onChange:e=>{c(e),e||n.setFieldsValue({input_cost_per_token:void 0,output_cost_per_token:void 0,input_cost_per_second:void 0})},className:"bg-gray-600"})}),(0,s.jsx)(f.Z.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(_.Z,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(el.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:"Select existing guardrails. Go to 'Guardrails' tab to create new guardrails.",children:(0,s.jsx)(v.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:o.map(e=>({value:e,label:e}))})}),(0,s.jsx)(f.Z.Item,{label:"Tags",name:"tags",className:"mb-4",children:(0,s.jsx)(v.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",options:Object.values(i).map(e=>({value:e.name,label:e.name,title:e.description||e.name}))})}),d&&(0,s.jsxs)("div",{className:"ml-6 pl-4 border-l-2 border-gray-200",children:[(0,s.jsx)(f.Z.Item,{label:"Pricing Model",name:"pricing_model",className:"mb-4",children:(0,s.jsx)(v.default,{defaultValue:"per_token",onChange:e=>u(e),options:[{value:"per_token",label:"Per Million Tokens"},{value:"per_second",label:"Per Second"}]})}),"per_token"===m?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.Z.Item,{label:"Input Cost (per 1M tokens)",name:"input_cost_per_token",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(eE.oi,{})}),(0,s.jsx)(f.Z.Item,{label:"Output Cost (per 1M tokens)",name:"output_cost_per_token",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(eE.oi,{})})]}):(0,s.jsx)(f.Z.Item,{label:"Cost Per Second",name:"input_cost_per_second",rules:[{validator:x}],className:"mb-4",children:(0,s.jsx)(eE.oi,{})})]}),(0,s.jsx)(f.Z.Item,{label:"Use in pass through routes",name:"use_in_pass_through",valuePropName:"checked",className:"mb-4 mt-4",tooltip:(0,s.jsxs)("span",{children:["Allow using these credentials in pass through routes."," ",(0,s.jsx)(eM,{href:"https://docs.litellm.ai/docs/pass_through/vertex_ai",target:"_blank",children:"Learn more"})]}),children:(0,s.jsx)(er.Z,{onChange:e=>{let l=n.getFieldValue("litellm_extra_params");try{let t=l?JSON.parse(l):{};e?t.use_in_pass_through=!0:delete t.use_in_pass_through,Object.keys(t).length>0?n.setFieldValue("litellm_extra_params",JSON.stringify(t,null,2)):n.setFieldValue("litellm_extra_params","")}catch(l){e?n.setFieldValue("litellm_extra_params",JSON.stringify({use_in_pass_through:!0},null,2)):n.setFieldValue("litellm_extra_params","")}},className:"bg-gray-600"})}),(0,s.jsx)(ed,{form:n,showCacheControl:h,onCacheControlChange:e=>{if(p(e),!e){let e=n.getFieldValue("litellm_extra_params");try{let l=e?JSON.parse(e):{};delete l.cache_control_injection_points,Object.keys(l).length>0?n.setFieldValue("litellm_extra_params",JSON.stringify(l,null,2)):n.setFieldValue("litellm_extra_params","")}catch(e){n.setFieldValue("litellm_extra_params","")}}}}),(0,s.jsx)(f.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:g}],children:(0,s.jsx)(eP.Z,{rows:4,placeholder:'{ "rpm": 100, "timeout": 0, "stream_timeout": 0 }'})}),(0,s.jsxs)(w.Z,{className:"mb-4",children:[(0,s.jsx)(k.Z,{span:10}),(0,s.jsx)(k.Z,{span:10,children:(0,s.jsxs)(eE.xv,{className:"text-gray-600 text-sm",children:["Pass JSON of litellm supported params"," ",(0,s.jsx)(eM,{href:"https://docs.litellm.ai/docs/completion/input",target:"_blank",children:"litellm.completion() call"})]})})]}),(0,s.jsx)(f.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:g}],children:(0,s.jsx)(eP.Z,{rows:4,placeholder:'{ "mode": "chat" }'})})]})})]})})},eL=t(29),eT=t.n(eL),eR=t(23496),eO=t(35291),eV=t(23639);let{Text:eD}=g.default;var eq=e=>{let{formValues:l,accessToken:t,testMode:r,modelName:o="this model",onClose:i,onTestComplete:d}=e,[u,h]=a.useState(null),[p,x]=a.useState(null),[g,f]=a.useState(null),[j,v]=a.useState(!0),[_,b]=a.useState(!1),[N,w]=a.useState(!1),k=async()=>{v(!0),w(!1),h(null),x(null),f(null),b(!1),await new Promise(e=>setTimeout(e,100));try{console.log("Testing connection with form values:",l);let a=await m(l,t,null);if(!a){console.log("No result from prepareModelAddRequest"),h("Failed to prepare model data. Please check your form inputs."),b(!1),v(!1);return}console.log("Result from prepareModelAddRequest:",a);let{litellmParamsObj:r,modelInfoObj:o,modelName:i}=a[0],d=await (0,n.testConnectionRequest)(t,r,o,null==o?void 0:o.mode);if("success"===d.status)c.Z.success("Connection test successful!"),h(null),b(!0);else{var e,s;let l=(null===(e=d.result)||void 0===e?void 0:e.error)||d.message||"Unknown error";h(l),x(r),f(null===(s=d.result)||void 0===s?void 0:s.raw_request_typed_dict),b(!1)}}catch(e){console.error("Test connection error:",e),h(e instanceof Error?e.message:String(e)),b(!1)}finally{v(!1),d&&d()}};a.useEffect(()=>{let e=setTimeout(()=>{k()},200);return()=>clearTimeout(e)},[]);let Z=e=>e?e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error: /,""):"Unknown error",C="string"==typeof u?Z(u):(null==u?void 0:u.message)?Z(u.message):"Unknown error",S=g?((e,l,t)=>{let s=JSON.stringify(l,null,2).split("\n").map(e=>" ".concat(e)).join("\n"),a=Object.entries(t).map(e=>{let[l,t]=e;return"-H '".concat(l,": ").concat(t,"'")}).join(" \\\n ");return"curl -X POST \\\n ".concat(e," \\\n ").concat(a?"".concat(a," \\\n "):"","-H 'Content-Type: application/json' \\\n -d '{\n").concat(s,"\n }'")})(g.raw_request_api_base,g.raw_request_body,g.raw_request_headers||{}):"";return(0,s.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:[j?(0,s.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,s.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b loading-spinner",children:(0,s.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-dc9a0e2d897fe63b"})}),(0,s.jsxs)(eD,{style:{fontSize:"16px"},children:["Testing connection to ",o,"..."]}),(0,s.jsx)(eT(),{id:"dc9a0e2d897fe63b",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)}}"})]}):_?(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,s.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},children:(0,s.jsx)("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:(0,s.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,s.jsxs)(eD,{type:"success",style:{fontSize:"18px",fontWeight:500,marginLeft:"10px"},children:["Connection to ",o," successful!"]})]}):(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"},children:[(0,s.jsx)(eO.Z,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,s.jsxs)(eD,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",o," failed"]})]}),(0,s.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,s.jsxs)(eD,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,s.jsx)(eD,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:C}),u&&(0,s.jsx)("div",{style:{marginTop:"12px"},children:(0,s.jsx)(y.ZP,{type:"link",onClick:()=>w(!N),style:{paddingLeft:0,height:"auto"},children:N?"Hide Details":"Show Details"})})]}),N&&(0,s.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,s.jsx)(eD,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Troubleshooting Details"}),(0,s.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 u?u:JSON.stringify(u,null,2)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(eD,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"API Request"}),(0,s.jsx)("pre",{style:{backgroundColor:"#f5f5f5",padding:"16px",borderRadius:"8px",fontSize:"13px",maxHeight:"250px",overflow:"auto",border:"1px solid #e8e8e8",lineHeight:"1.5"},children:S||"No request data available"}),(0,s.jsx)(y.ZP,{style:{marginTop:"8px"},icon:(0,s.jsx)(eV.Z,{}),onClick:()=>{navigator.clipboard.writeText(S||""),c.Z.success("Copied to clipboard")},children:"Copy to Clipboard"})]})]})}),(0,s.jsx)(eR.Z,{style:{margin:"24px 0 16px"}}),(0,s.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,s.jsx)(y.ZP,{type:"link",href:"https://docs.litellm.ai/docs/providers",target:"_blank",icon:(0,s.jsx)(el.Z,{}),children:"View Documentation"})})]})};let ez=[{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"},{value:"batch",label:"Batch - /batch"},{value:"ocr",label:"OCR - /ocr"}];var eB=t(92858),eK=t(84376),eU=t(20347);let eG=async(e,l,t,s)=>{try{console.log("=== AUTO ROUTER SUBMIT HANDLER CALLED ==="),console.log("handling auto router submit for formValues:",e),console.log("Access token:",l?"Present":"Missing"),console.log("Form:",t?"Present":"Missing"),console.log("Callback:",s?"Present":"Missing");let a={model_name:e.auto_router_name,litellm_params:{model:"auto_router/".concat(e.auto_router_name),auto_router_config:JSON.stringify(e.auto_router_config),auto_router_default_model:e.auto_router_default_model},model_info:{}};e.auto_router_embedding_model&&"custom"!==e.auto_router_embedding_model?a.litellm_params.auto_router_embedding_model=e.auto_router_embedding_model:e.custom_embedding_model&&(a.litellm_params.auto_router_embedding_model=e.custom_embedding_model),e.team_id&&(a.model_info.team_id=e.team_id),e.model_access_group&&e.model_access_group.length>0&&(a.model_info.access_groups=e.model_access_group),console.log("Auto router configuration to be created:",a),console.log("Auto router config (stringified):",a.litellm_params.auto_router_config),console.log("Calling modelCreateCall with:",{accessToken:l?"Present":"Missing",config:a});let r=await (0,n.modelCreateCall)(l,a);console.log("response for auto router create call:",r),t.resetFields()}catch(e){console.error("Failed to add auto router:",e),c.Z.fromBackend("Failed to add auto router: "+e)}},{Title:eH,Link:eW}=g.default;var eY=e=>{let{form:l,handleOk:t,accessToken:r,userRole:o}=e,[i,d]=(0,a.useState)(!1),[m,u]=(0,a.useState)(!1),[h,p]=(0,a.useState)(""),[x,N]=(0,a.useState)([]),[w,k]=(0,a.useState)([]),[Z,C]=(0,a.useState)(!1),[S,A]=(0,a.useState)(!1),[I,E]=(0,a.useState)(null);(0,a.useEffect)(()=>{(async()=>{N((await (0,n.modelAvailableCall)(r,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[r]),(0,a.useEffect)(()=>{(async()=>{try{let e=await (0,eh.p)(r);console.log("Fetched models for auto router:",e),k(e)}catch(e){console.error("Error fetching model info for auto router:",e)}})()},[r]);let P=eU.ZL.includes(o),M=async()=>{u(!0),p("test-".concat(Date.now())),d(!0)},F=()=>{console.log("Auto router submit triggered!"),console.log("Router config:",I);let e=l.getFieldsValue();if(console.log("Form values:",e),!e.auto_router_name){c.Z.fromBackend("Please enter an Auto Router Name");return}if(!e.auto_router_default_model){c.Z.fromBackend("Please select a Default Model");return}if(l.setFieldsValue({custom_llm_provider:"auto_router",model:e.auto_router_name,api_key:"not_required_for_auto_router"}),!I||!I.routes||0===I.routes.length){c.Z.fromBackend("Please configure at least one route for the auto router");return}if(I.routes.filter(e=>!e.name||!e.description||0===e.utterances.length).length>0){c.Z.fromBackend("Please ensure all routes have a target model, description, and at least one utterance");return}l.validateFields().then(e=>{console.log("Form validation passed, submitting with values:",e);let s={...e,auto_router_config:I};console.log("Final submit values:",s),eG(s,r,l,t)}).catch(e=>{console.error("Validation failed:",e);let l=e.errorFields||[];if(l.length>0){let e=l.map(e=>{let l=e.name[0];return({auto_router_name:"Auto Router Name",auto_router_default_model:"Default Model",auto_router_embedding_model:"Embedding Model"})[l]||l});c.Z.fromBackend("Please fill in the following required fields: ".concat(e.join(", ")))}else c.Z.fromBackend("Please fill in all required fields")})};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eH,{level:2,children:"Add Auto Router"}),(0,s.jsx)(b.x,{className:"text-gray-600 mb-6",children:"Create an auto router with intelligent routing logic that automatically selects the best model based on user input patterns and semantic matching."}),(0,s.jsx)(ex.Z,{children:(0,s.jsxs)(f.Z,{form:l,onFinish:F,labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:[(0,s.jsx)(f.Z.Item,{rules:[{required:!0,message:"Auto router name is required"}],label:"Auto Router Name",name:"auto_router_name",tooltip:"Unique name for this auto router configuration",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(b.o,{placeholder:"e.g., auto_router_1, smart_routing"})}),(0,s.jsx)("div",{className:"w-full mb-4",children:(0,s.jsx)(eb,{modelInfo:w,value:I,onChange:e=>{E(e),l.setFieldValue("auto_router_config",e)}})}),(0,s.jsx)(f.Z.Item,{rules:[{required:!0,message:"Default model is required"}],label:"Default Model",name:"auto_router_default_model",tooltip:"Fallback model to use when auto routing logic cannot determine the best model",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(v.default,{placeholder:"Select a default model",onChange:e=>{C("custom"===e)},options:[...Array.from(new Set(w.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0})}),(0,s.jsx)(f.Z.Item,{label:"Embedding Model",name:"auto_router_embedding_model",tooltip:"Optional: Embedding model to use for semantic routing decisions",labelCol:{span:10},labelAlign:"left",children:(0,s.jsx)(v.default,{value:l.getFieldValue("auto_router_embedding_model"),placeholder:"Select an embedding model (optional)",onChange:e=>{A("custom"===e),l.setFieldValue("auto_router_embedding_model",e)},options:[...Array.from(new Set(w.map(e=>e.model_group))).map(e=>({value:e,label:e})),{value:"custom",label:"Enter custom model name"}],style:{width:"100%"},showSearch:!0,allowClear:!0})}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Settings"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),P&&(0,s.jsx)(f.Z.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to control who can access this auto router",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:x.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})}),(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(_.Z,{title:"Get help on our github",children:(0,s.jsx)(g.default.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{className:"space-x-2",children:[(0,s.jsx)(y.ZP,{onClick:M,loading:m,children:"Test Connect"}),(0,s.jsx)(y.ZP,{onClick:()=>{console.log("Add Auto Router button clicked!"),console.log("Current router config:",I),console.log("Current form values:",l.getFieldsValue()),F()},children:"Add Auto Router"})]})]})]})}),(0,s.jsx)(j.Z,{title:"Connection Test Results",open:i,onCancel:()=>{d(!1),u(!1)},footer:[(0,s.jsx)(y.ZP,{onClick:()=>{d(!1),u(!1)},children:"Close"},"close")],width:700,children:i&&(0,s.jsx)(eq,{formValues:l.getFieldsValue(),accessToken:r,testMode:"chat",modelName:l.getFieldValue("auto_router_name"),onClose:()=>{d(!1),u(!1)},onTestComplete:()=>u(!1)},h)})]})};let{Title:eJ,Link:e$}=g.default;var eQ=e=>{let{form:l,handleOk:t,selectedProvider:r,setSelectedProvider:o,providerModels:c,setProviderModelsFn:m,getPlaceholder:u,uploadProps:h,showAdvancedSettings:p,setShowAdvancedSettings:x,teams:b,credentials:N,accessToken:Z,userRole:C,premiumUser:S}=e,[I]=f.Z.useForm(),[E,P]=(0,a.useState)("chat"),[M,F]=(0,a.useState)(!1),[L,T]=(0,a.useState)(!1),[R,O]=(0,a.useState)([]),[V,D]=(0,a.useState)({}),[q,z]=(0,a.useState)("");(0,a.useEffect)(()=>{(async()=>{try{let e=(await (0,n.getGuardrailsList)(Z)).guardrails.map(e=>e.guardrail_name);O(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[Z]),(0,a.useEffect)(()=>{(async()=>{try{let e=await (0,n.tagListCall)(Z);D(e)}catch(e){console.error("Failed to fetch tags:",e)}})()},[Z]);let B=async()=>{T(!0),z("test-".concat(Date.now())),F(!0)},[K,U]=(0,a.useState)(!1),[G,H]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{H((await (0,n.modelAvailableCall)(Z,"","",!1,null,!0,!0)).data.map(e=>e.id))})()},[Z]);let W=eU.ZL.includes(C);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(ek.v0,{className:"w-full",children:[(0,s.jsxs)(ek.td,{className:"mb-4",children:[(0,s.jsx)(ek.OK,{children:"Add Model"}),(0,s.jsx)(ek.OK,{children:"Add Auto Router"})]}),(0,s.jsxs)(ek.nP,{children:[(0,s.jsxs)(ek.x4,{children:[(0,s.jsx)(eJ,{level:2,children:"Add Model"}),(0,s.jsx)(ex.Z,{children:(0,s.jsx)(f.Z,{form:l,onFinish:e=>{console.log("\uD83D\uDD25 Form onFinish triggered with values:",e),t()},onFinishFailed:e=>{console.log("\uD83D\uDCA5 Form onFinishFailed triggered:",e)},labelCol:{span:10},wrapperCol:{span:16},labelAlign:"left",children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(f.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,s.jsx)(v.default,{showSearch:!0,value:r,onChange:e=>{o(e),m(e),l.setFieldsValue({model:[],model_name:void 0})},children:Object.entries(d.Cl).map(e=>{let[l,t]=e;return(0,s.jsx)(v.default.Option,{value:l,children:(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("img",{src:d.cd[t],alt:"".concat(l," logo"),className:"w-5 h-5",onError:e=>{let l=e.target,s=l.parentElement;if(s){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=t.charAt(0),s.replaceChild(e,l)}}}),(0,s.jsx)("span",{children:t})]})},l)})})}),(0,s.jsx)(eZ,{selectedProvider:r,providerModels:c,getPlaceholder:u}),(0,s.jsx)(eI,{}),(0,s.jsx)(f.Z.Item,{label:"Mode",name:"mode",className:"mb-1",children:(0,s.jsx)(v.default,{style:{width:"100%"},value:E,onChange:e=>P(e),options:ez})}),(0,s.jsxs)(w.Z,{children:[(0,s.jsx)(k.Z,{span:10}),(0,s.jsx)(k.Z,{span:10,children:(0,s.jsxs)(i.Z,{className:"mb-5 mt-1",children:[(0,s.jsx)("strong",{children:"Optional"})," - LiteLLM endpoint to use when health checking this model"," ",(0,s.jsx)(e$,{href:"https://docs.litellm.ai/docs/proxy/health#health",target:"_blank",children:"Learn more"})]})})]}),(0,s.jsx)("div",{className:"mb-4",children:(0,s.jsx)(g.default.Text,{className:"text-sm text-gray-500 mb-2",children:"Either select existing credentials OR enter new provider credentials below"})}),(0,s.jsx)(f.Z.Item,{label:"Existing Credentials",name:"litellm_credential_name",children:(0,s.jsx)(v.default,{showSearch:!0,placeholder:"Select or search for existing credentials",optionFilterProp:"children",filterOption:(e,l)=>{var t;return(null!==(t=null==l?void 0:l.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},options:[{value:null,label:"None"},...N.map(e=>({value:e.credential_name,label:e.credential_name}))],allowClear:!0})}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"OR"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,s.jsx)(f.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,t=l("litellm_credential_name");return(console.log("\uD83D\uDD11 Credential Name Changed:",t),t)?(0,s.jsx)("div",{className:"text-gray-500 text-sm text-center",children:"Using existing credentials - no additional provider fields needed"}):(0,s.jsx)(A,{selectedProvider:r,uploadProps:h})}}),(0,s.jsxs)("div",{className:"flex items-center my-4",children:[(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"}),(0,s.jsx)("span",{className:"px-4 text-gray-500 text-sm",children:"Additional Model Info Settings"}),(0,s.jsx)("div",{className:"flex-grow border-t border-gray-200"})]}),(0,s.jsx)(f.Z.Item,{label:"Team-BYOK Model",tooltip:"Only use this model + credential combination for this team. Useful when teams want to onboard their own OpenAI keys.",className:"mb-4",children:(0,s.jsx)(_.Z,{title:S?"":"This is an enterprise-only feature. Upgrade to premium to restrict model+credential combinations to a specific team.",placement:"top",children:(0,s.jsx)(eB.Z,{checked:K,onChange:e=>{U(e),e||l.setFieldValue("team_id",void 0)},disabled:!S})})}),K&&(0,s.jsx)(f.Z.Item,{label:"Select Team",name:"team_id",className:"mb-4",tooltip:"Only keys for this team will be able to call this model.",rules:[{required:K&&!W,message:"Please select a team."}],children:(0,s.jsx)(eK.Z,{teams:b,disabled:!S})}),W&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(f.Z.Item,{label:"Model Access Group",name:"model_access_group",className:"mb-4",tooltip:"Use model access groups to give users access to select models, and add new ones to the group over time.",children:(0,s.jsx)(v.default,{mode:"tags",showSearch:!0,placeholder:"Select existing groups or type to create new ones",optionFilterProp:"children",tokenSeparators:[","],options:G.map(e=>({value:e,label:e})),maxTagCount:"responsive",allowClear:!0})})}),(0,s.jsx)(eF,{showAdvancedSettings:p,setShowAdvancedSettings:x,teams:b,guardrailsList:R,tagsList:V}),(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(_.Z,{title:"Get help on our github",children:(0,s.jsx)(g.default.Link,{href:"https://github.com/BerriAI/litellm/issues",children:"Need Help?"})}),(0,s.jsxs)("div",{className:"space-x-2",children:[(0,s.jsx)(y.ZP,{onClick:B,loading:L,children:"Test Connect"}),(0,s.jsx)(y.ZP,{htmlType:"submit",children:"Add Model"})]})]})]})})})]}),(0,s.jsx)(ek.x4,{children:(0,s.jsx)(eY,{form:I,handleOk:()=>{I.validateFields().then(e=>{eG(e,Z,I,t)}).catch(e=>{console.error("Validation failed:",e)})},accessToken:Z,userRole:C})})]})]}),(0,s.jsx)(j.Z,{title:"Connection Test Results",open:M,onCancel:()=>{F(!1),T(!1)},footer:[(0,s.jsx)(y.ZP,{onClick:()=>{F(!1),T(!1)},children:"Close"},"close")],width:700,children:M&&(0,s.jsx)(eq,{formValues:l.getFieldsValue(),accessToken:Z,testMode:E,modelName:l.getFieldValue("model_name")||l.getFieldValue("model"),onClose:()=>{F(!1),T(!1)},onTestComplete:()=>T(!1)},q)})]})},eX=t(41649),e0=t(8048),e1=t(61994),e2=t(15731),e4=t(91126);let e5=(e,l,t,a,r,o,i,n,d,c,m)=>[{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e1.Z,{checked:t,indeterminate:l.length>0&&!t,onChange:e=>r(e.target.checked),onClick:e=>e.stopPropagation()}),(0,s.jsx)("span",{children:"Model ID"})]}),accessorKey:"model_info.id",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:t}=e,r=t.original,o=r.model_name,i=l.includes(o);return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e1.Z,{checked:i,onChange:e=>a(o,e.target.checked),onClick:e=>e.stopPropagation()}),(0,s.jsx)(_.Z,{title:r.model_info.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>m&&m(r.model_info.id),children:r.model_info.id})})]})}},{header:"Model Name",accessorKey:"model_name",enableSorting:!0,sortingFn:"alphanumeric",cell:e=>{let{row:l}=e,t=l.original,a=n(t)||t.model_name;return(0,s.jsx)("div",{className:"font-medium text-sm",children:(0,s.jsx)(_.Z,{title:a,children:(0,s.jsx)("div",{className:"truncate max-w-[200px]",children:a})})})}},{header:"Health Status",accessorKey:"health_status",enableSorting:!0,sortingFn:(e,l,t)=>{var s,a;let r=e.getValue("health_status")||"unknown",o=l.getValue("health_status")||"unknown",i={healthy:0,checking:1,unknown:2,unhealthy:3};return(null!==(s=i[r])&&void 0!==s?s:4)-(null!==(a=i[o])&&void 0!==a?a:4)},cell:l=>{var t;let{row:a}=l,r=a.original,o={status:r.health_status,loading:r.health_loading,error:r.health_error};if(o.loading)return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse"}),(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,s.jsx)("div",{className:"w-2 h-2 bg-indigo-500 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}),(0,s.jsx)(ev.x,{className:"text-gray-600 text-sm",children:"Checking..."})]});let n=r.model_name,d="healthy"===o.status&&(null===(t=e[n])||void 0===t?void 0:t.successResponse);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[i(o.status),d&&c&&(0,s.jsx)(_.Z,{title:"View response details",placement:"top",children:(0,s.jsx)("button",{onClick:()=>{var l;return c(n,null===(l=e[n])||void 0===l?void 0:l.successResponse)},className:"p-1 text-green-600 hover:text-green-800 hover:bg-green-50 rounded cursor-pointer transition-colors",children:(0,s.jsx)(e2.Z,{className:"h-4 w-4"})})})]})}},{header:"Error Details",accessorKey:"health_error",enableSorting:!1,cell:l=>{let{row:t}=l,a=t.original.model_name,r=e[a];if(!(null==r?void 0:r.error))return(0,s.jsx)(ev.x,{className:"text-gray-400 text-sm",children:"No errors"});let o=r.error,i=r.fullError||r.error;return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"max-w-[200px]",children:(0,s.jsx)(_.Z,{title:o,placement:"top",children:(0,s.jsx)(ev.x,{className:"text-red-600 text-sm truncate",children:o})})}),d&&i!==o&&(0,s.jsx)(_.Z,{title:"View full error details",placement:"top",children:(0,s.jsx)("button",{onClick:()=>d(a,o,i),className:"p-1 text-red-600 hover:text-red-800 hover:bg-red-50 rounded cursor-pointer transition-colors",children:(0,s.jsx)(e2.Z,{className:"h-4 w-4"})})})]})}},{header:"Last Check",accessorKey:"last_check",enableSorting:!0,sortingFn:(e,l,t)=>{let s=e.getValue("last_check")||"Never checked",a=l.getValue("last_check")||"Never checked";if("Never checked"===s&&"Never checked"===a)return 0;if("Never checked"===s)return 1;if("Never checked"===a)return -1;if("Check in progress..."===s&&"Check in progress..."===a)return 0;if("Check in progress..."===s)return -1;if("Check in progress..."===a)return 1;let r=new Date(s),o=new Date(a);return isNaN(r.getTime())&&isNaN(o.getTime())?0:isNaN(r.getTime())?1:isNaN(o.getTime())?-1:o.getTime()-r.getTime()},cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)(ev.x,{className:"text-gray-600 text-sm",children:t.health_loading?"Check in progress...":t.last_check})}},{header:"Last Success",accessorKey:"last_success",enableSorting:!0,sortingFn:(e,l,t)=>{let s=e.getValue("last_success")||"Never succeeded",a=l.getValue("last_success")||"Never succeeded";if("Never succeeded"===s&&"Never succeeded"===a)return 0;if("Never succeeded"===s)return 1;if("Never succeeded"===a)return -1;if("None"===s&&"None"===a)return 0;if("None"===s)return 1;if("None"===a)return -1;let r=new Date(s),o=new Date(a);return isNaN(r.getTime())&&isNaN(o.getTime())?0:isNaN(r.getTime())?1:isNaN(o.getTime())?-1:o.getTime()-r.getTime()},cell:l=>{let{row:t}=l,a=e[t.original.model_name],r=(null==a?void 0:a.lastSuccess)||"None";return(0,s.jsx)(ev.x,{className:"text-gray-600 text-sm",children:r})}},{header:"Actions",id:"actions",cell:e=>{let{row:l}=e,t=l.original,a=t.model_name,r=t.health_status&&"none"!==t.health_status,i=t.health_loading?"Checking...":r?"Re-run Health Check":"Run Health Check";return(0,s.jsx)(_.Z,{title:i,placement:"top",children:(0,s.jsx)("button",{className:"p-2 rounded-md transition-colors ".concat(t.health_loading?"text-gray-400 cursor-not-allowed bg-gray-100":"text-indigo-600 hover:text-indigo-700 hover:bg-indigo-50"),onClick:()=>{t.health_loading||o(a)},disabled:t.health_loading,children:t.health_loading?(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse"}),(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.2s"}}),(0,s.jsx)("div",{className:"w-1 h-1 bg-gray-400 rounded-full animate-pulse",style:{animationDelay:"0.4s"}})]}):r?(0,s.jsx)(U.Z,{className:"h-4 w-4"}):(0,s.jsx)(e4.Z,{className:"h-4 w-4"})})})},enableSorting:!1}],e6=[{pattern:/Missing .* API Key/i,replacement:"Missing API Key"},{pattern:/Connection timeout/i,replacement:"Connection timeout"},{pattern:/Network.*not.*ok/i,replacement:"Network connection failed"},{pattern:/403.*Forbidden/i,replacement:"Access forbidden - check API key permissions"},{pattern:/401.*Unauthorized/i,replacement:"Unauthorized - invalid API key"},{pattern:/429.*rate limit/i,replacement:"Rate limit exceeded"},{pattern:/500.*Internal Server Error/i,replacement:"Provider internal server error"},{pattern:/litellm\.AuthenticationError/i,replacement:"Authentication failed"},{pattern:/litellm\.RateLimitError/i,replacement:"Rate limit exceeded"},{pattern:/litellm\.APIError/i,replacement:"API error"}];var e3=e=>{let{accessToken:l,modelData:t,all_models_on_proxy:r,getDisplayModelName:o,setSelectedModelId:d}=e,[c,m]=(0,a.useState)({}),[u,h]=(0,a.useState)([]),[p,x]=(0,a.useState)(!1),[g,f]=(0,a.useState)(!1),[v,_]=(0,a.useState)(null),[b,N]=(0,a.useState)(!1),[w,k]=(0,a.useState)(null),Z=(0,a.useRef)(null);(0,a.useEffect)(()=>{l&&(null==t?void 0:t.data)&&(async()=>{let e={};t.data.forEach(l=>{e[l.model_name]={status:"none",lastCheck:"None",lastSuccess:"None",loading:!1,error:void 0,fullError:void 0,successResponse:void 0}});try{let s=await (0,n.latestHealthChecksCall)(l);s&&s.latest_health_checks&&"object"==typeof s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(l=>{let[s,a]=l;if(!a)return;let r=null,o=t.data.find(e=>e.model_name===s);if(o)r=o.model_name;else{let e=t.data.find(e=>e.model_info&&e.model_info.id===s);if(e)r=e.model_name;else if(a.model_name){let e=t.data.find(e=>e.model_name===a.model_name);e&&(r=e.model_name)}}if(r){let l=a.error_message||void 0;e[r]={status:a.status||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():"None",loading:!1,error:l?C(l):void 0,fullError:l,successResponse:"healthy"===a.status?a:void 0}}})}catch(e){console.warn("Failed to load health check history (using default states):",e)}m(e)})()},[l,t]);let C=e=>{var l;if(!e)return"Health check failed";let t="string"==typeof e?e:JSON.stringify(e),s=t.match(/(\w+Error):\s*(\d{3})/i);if(s)return"".concat(s[1],": ").concat(s[2]);let a=t.match(/(AuthenticationError|RateLimitError|BadRequestError|InternalServerError|TimeoutError|NotFoundError|ForbiddenError|ServiceUnavailableError|BadGatewayError|ContentPolicyViolationError|\w+Error)/i),r=t.match(/\b(400|401|403|404|408|429|500|502|503|504)\b/);if(a&&r)return"".concat(a[1],": ").concat(r[1]);if(r){let e=r[1];return"".concat({400:"BadRequestError",401:"AuthenticationError",403:"ForbiddenError",404:"NotFoundError",408:"TimeoutError",429:"RateLimitError",500:"InternalServerError",502:"BadGatewayError",503:"ServiceUnavailableError",504:"GatewayTimeoutError"}[e],": ").concat(e)}if(a){let e=a[1],l={AuthenticationError:"401",RateLimitError:"429",BadRequestError:"400",InternalServerError:"500",TimeoutError:"408",NotFoundError:"404",ForbiddenError:"403",ServiceUnavailableError:"503",BadGatewayError:"502",GatewayTimeoutError:"504",ContentPolicyViolationError:"400"}[e];return l?"".concat(e,": ").concat(l):e}for(let{pattern:e,replacement:l}of e6)if(e.test(t))return l;if(/missing.*api.*key|invalid.*key|unauthorized/i.test(t))return"AuthenticationError: 401";if(/rate.*limit|too.*many.*requests/i.test(t))return"RateLimitError: 429";if(/timeout|timed.*out/i.test(t))return"TimeoutError: 408";if(/not.*found/i.test(t))return"NotFoundError: 404";if(/forbidden|access.*denied/i.test(t))return"ForbiddenError: 403";if(/internal.*server.*error/i.test(t))return"InternalServerError: 500";let o=t.replace(/[\n\r]+/g," ").replace(/\s+/g," ").trim(),i=null===(l=o.split(/[.!?]/)[0])||void 0===l?void 0:l.trim();return i&&i.length>0?i.length>100?i.substring(0,97)+"...":i:o.length>100?o.substring(0,97)+"...":o},S=async e=>{if(l){m(l=>({...l,[e]:{...l[e],loading:!0,status:"checking"}}));try{var s,a;let r=await (0,n.individualModelHealthCheckCall)(l,e),o=new Date().toLocaleString();if(r.unhealthy_count>0&&r.unhealthy_endpoints&&r.unhealthy_endpoints.length>0){let l=(null===(s=r.unhealthy_endpoints[0])||void 0===s?void 0:s.error)||"Health check failed",t=C(l);m(s=>{var a;return{...s,[e]:{status:"unhealthy",lastCheck:o,lastSuccess:(null===(a=s[e])||void 0===a?void 0:a.lastSuccess)||"None",loading:!1,error:t,fullError:l}}})}else m(l=>({...l,[e]:{status:"healthy",lastCheck:o,lastSuccess:o,loading:!1,successResponse:r}}));try{let s=await (0,n.latestHealthChecksCall)(l),r=t.data.find(l=>l.model_name===e);if(r){let l=r.model_info.id,t=null===(a=s.latest_health_checks)||void 0===a?void 0:a[l];if(t){let l=t.error_message||void 0;m(s=>{var a,r,o,i,n,d,c;return{...s,[e]:{status:t.status||(null===(a=s[e])||void 0===a?void 0:a.status)||"unknown",lastCheck:t.checked_at?new Date(t.checked_at).toLocaleString():(null===(r=s[e])||void 0===r?void 0:r.lastCheck)||"None",lastSuccess:"healthy"===t.status?t.checked_at?new Date(t.checked_at).toLocaleString():(null===(o=s[e])||void 0===o?void 0:o.lastSuccess)||"None":(null===(i=s[e])||void 0===i?void 0:i.lastSuccess)||"None",loading:!1,error:l?C(l):null===(n=s[e])||void 0===n?void 0:n.error,fullError:l||(null===(d=s[e])||void 0===d?void 0:d.fullError),successResponse:"healthy"===t.status?t:null===(c=s[e])||void 0===c?void 0:c.successResponse}}})}}}catch(e){console.debug("Could not fetch updated status from database (non-critical):",e)}}catch(a){let l=new Date().toLocaleString(),t=a instanceof Error?a.message:String(a),s=C(t);m(a=>{var r;return{...a,[e]:{status:"unhealthy",lastCheck:l,lastSuccess:(null===(r=a[e])||void 0===r?void 0:r.lastSuccess)||"None",loading:!1,error:s,fullError:t}}})}}},A=async()=>{let e=u.length>0?u:r,s=e.reduce((e,l)=>(e[l]={...c[l],loading:!0,status:"checking"},e),{});m(e=>({...e,...s}));let a={},o=e.map(async e=>{if(l)try{let s=await (0,n.individualModelHealthCheckCall)(l,e);a[e]=s;let r=new Date().toLocaleString();if(s.unhealthy_count>0&&s.unhealthy_endpoints&&s.unhealthy_endpoints.length>0){var t;let l=(null===(t=s.unhealthy_endpoints[0])||void 0===t?void 0:t.error)||"Health check failed",a=C(l);m(t=>{var s;return{...t,[e]:{status:"unhealthy",lastCheck:r,lastSuccess:(null===(s=t[e])||void 0===s?void 0:s.lastSuccess)||"None",loading:!1,error:a,fullError:l}}})}else m(l=>({...l,[e]:{status:"healthy",lastCheck:r,lastSuccess:r,loading:!1,successResponse:s}}))}catch(a){console.error("Health check failed for ".concat(e,":"),a);let l=new Date().toLocaleString(),t=a instanceof Error?a.message:String(a),s=C(t);m(a=>{var r;return{...a,[e]:{status:"unhealthy",lastCheck:l,lastSuccess:(null===(r=a[e])||void 0===r?void 0:r.lastSuccess)||"None",loading:!1,error:s,fullError:t}}})}});await Promise.allSettled(o);try{if(!l)return;let s=await (0,n.latestHealthChecksCall)(l);s.latest_health_checks&&Object.entries(s.latest_health_checks).forEach(l=>{let[s,a]=l,r=t.data.find(e=>e.model_info.id===s);if(r&&e.includes(r.model_name)&&a){let e=r.model_name,l=a.error_message||void 0;m(t=>{let s=t[e];return{...t,[e]:{status:a.status||(null==s?void 0:s.status)||"unknown",lastCheck:a.checked_at?new Date(a.checked_at).toLocaleString():(null==s?void 0:s.lastCheck)||"None",lastSuccess:"healthy"===a.status&&a.checked_at?new Date(a.checked_at).toLocaleString():(null==s?void 0:s.lastSuccess)||"None",loading:!1,error:l?C(l):null==s?void 0:s.error,fullError:l||(null==s?void 0:s.fullError),successResponse:"healthy"===a.status?a:null==s?void 0:s.successResponse}}})}})}catch(e){console.warn("Failed to fetch updated health statuses from database (non-critical):",e)}},I=e=>{x(e),e?h(r):h([])},E=()=>{f(!1),_(null)},P=()=>{N(!1),k(null)};return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-6",children:(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(J.Z,{children:"Model Health Status"}),(0,s.jsx)(i.Z,{className:"text-gray-600 mt-1",children:"Run health checks on individual models to verify they are working correctly"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[u.length>0&&(0,s.jsx)(H.Z,{size:"sm",variant:"light",onClick:()=>I(!1),className:"px-3 py-1 text-sm",children:"Clear Selection"}),(0,s.jsx)(H.Z,{size:"sm",variant:"secondary",onClick:A,disabled:Object.values(c).some(e=>e.loading),className:"px-3 py-1 text-sm",children:u.length>0&&u.length{l?h(l=>[...l,e]):(h(l=>l.filter(l=>l!==e)),x(!1))},I,S,e=>{switch(e){case"healthy":return(0,s.jsx)(eX.Z,{color:"emerald",children:"healthy"});case"unhealthy":return(0,s.jsx)(eX.Z,{color:"red",children:"unhealthy"});case"checking":return(0,s.jsx)(eX.Z,{color:"blue",children:"checking"});case"none":return(0,s.jsx)(eX.Z,{color:"gray",children:"none"});default:return(0,s.jsx)(eX.Z,{color:"gray",children:"unknown"})}},o,(e,l,t)=>{_({modelName:e,cleanedError:l,fullError:t}),f(!0)},(e,l)=>{k({modelName:e,response:l}),N(!0)},d),data:t.data.map(e=>{let l=c[e.model_name]||{status:"none",lastCheck:"None",loading:!1};return{model_name:e.model_name,model_info:e.model_info,provider:e.provider,litellm_model_name:e.litellm_model_name,health_status:l.status,last_check:l.lastCheck,last_success:l.lastSuccess||"None",health_loading:l.loading,health_error:l.error,health_full_error:l.fullError}}),isLoading:!1,table:Z})}),(0,s.jsx)(j.Z,{title:v?"Health Check Error - ".concat(v.modelName):"Error Details",open:g,onCancel:E,footer:[(0,s.jsx)(y.ZP,{onClick:E,children:"Close"},"close")],width:800,children:v&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Error:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-red-50 border border-red-200 rounded-md",children:(0,s.jsx)(i.Z,{className:"text-red-800",children:v.cleanedError})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Full Error Details:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,s.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:v.fullError})})]})]})}),(0,s.jsx)(j.Z,{title:w?"Health Check Response - ".concat(w.modelName):"Response Details",open:b,onCancel:P,footer:[(0,s.jsx)(y.ZP,{onClick:P,children:"Close"},"close")],width:800,children:w&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Status:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:(0,s.jsx)(i.Z,{className:"text-green-800",children:"Health check passed successfully"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"font-medium",children:"Response Details:"}),(0,s.jsx)("div",{className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md max-h-96 overflow-y-auto",children:(0,s.jsx)("pre",{className:"text-sm text-gray-800 whitespace-pre-wrap",children:JSON.stringify(w.response,null,2)})})]})]})})]})},e8=t(7166),e7=t(86462),e9=t(47686),le=t(77355),ll=t(93416),lt=t(95704),ls=e=>{let{accessToken:l,initialModelGroupAlias:t={},onAliasUpdate:r}=e,[o,i]=(0,a.useState)([]),[d,m]=(0,a.useState)({aliasName:"",targetModelGroup:""}),[u,h]=(0,a.useState)(null),[p,g]=(0,a.useState)(!0);(0,a.useEffect)(()=>{i(Object.entries(t).map((e,l)=>{var t;let[s,a]=e;return{id:"".concat(l,"-").concat(s),aliasName:s,targetModelGroup:"string"==typeof a?a:null!==(t=null==a?void 0:a.model)&&void 0!==t?t:""}}))},[t]);let f=async e=>{if(!l)return console.error("Access token is missing"),!1;try{let t={};return e.forEach(e=>{t[e.aliasName]=e.targetModelGroup}),console.log("Saving model group alias:",t),await (0,n.setCallbacksCall)(l,{router_settings:{model_group_alias:t}}),r&&r(t),!0}catch(e){return console.error("Failed to save model group alias settings:",e),c.Z.fromBackend("Failed to save model group alias settings"),!1}},j=async()=>{if(!d.aliasName||!d.targetModelGroup){c.Z.fromBackend("Please provide both alias name and target model group");return}if(o.some(e=>e.aliasName===d.aliasName)){c.Z.fromBackend("An alias with this name already exists");return}let e=[...o,{id:"".concat(Date.now(),"-").concat(d.aliasName),aliasName:d.aliasName,targetModelGroup:d.targetModelGroup}];await f(e)&&(i(e),m({aliasName:"",targetModelGroup:""}),c.Z.success("Alias added successfully"))},v=e=>{h({...e})},_=async()=>{if(!u)return;if(!u.aliasName||!u.targetModelGroup){c.Z.fromBackend("Please provide both alias name and target model group");return}if(o.some(e=>e.id!==u.id&&e.aliasName===u.aliasName)){c.Z.fromBackend("An alias with this name already exists");return}let e=o.map(e=>e.id===u.id?u:e);await f(e)&&(i(e),h(null),c.Z.success("Alias updated successfully"))},y=()=>{h(null)},b=async e=>{let l=o.filter(l=>l.id!==e);await f(l)&&(i(l),c.Z.success("Alias deleted successfully"))},N=o.reduce((e,l)=>(e[l.aliasName]=l.targetModelGroup,e),{});return(0,s.jsxs)(lt.Zb,{className:"mb-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between cursor-pointer",onClick:()=>g(!p),children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)(lt.Dx,{className:"mb-0",children:"Model Group Alias Settings"}),(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Create aliases for your model groups to simplify API calls. For example, you can create an alias 'gpt-4o' that points to 'gpt-4o-mini-openai' model group."})]}),(0,s.jsx)("div",{className:"flex items-center",children:p?(0,s.jsx)(e7.Z,{className:"w-5 h-5 text-gray-500"}):(0,s.jsx)(e9.Z,{className:"w-5 h-5 text-gray-500"})})]}),p&&(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(lt.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,s.jsx)("input",{type:"text",value:d.aliasName,onChange:e=>m({...d,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model Group"}),(0,s.jsx)("input",{type:"text",value:d.targetModelGroup,onChange:e=>m({...d,targetModelGroup:e.target.value}),placeholder:"e.g., gpt-4o-mini-openai",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,s.jsx)("div",{className:"flex items-end",children:(0,s.jsxs)("button",{onClick:j,disabled:!d.aliasName||!d.targetModelGroup,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(d.aliasName&&d.targetModelGroup?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,s.jsx)(le.Z,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,s.jsx)(lt.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,s.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(lt.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,s.jsx)(lt.ss,{children:(0,s.jsxs)(lt.SC,{children:[(0,s.jsx)(lt.xs,{className:"py-1 h-8",children:"Alias Name"}),(0,s.jsx)(lt.xs,{className:"py-1 h-8",children:"Target Model Group"}),(0,s.jsx)(lt.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,s.jsxs)(lt.RM,{children:[o.map(e=>(0,s.jsx)(lt.SC,{className:"h-8",children:u&&u.id===e.id?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lt.pj,{className:"py-0.5",children:(0,s.jsx)("input",{type:"text",value:u.aliasName,onChange:e=>h({...u,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,s.jsx)(lt.pj,{className:"py-0.5",children:(0,s.jsx)("input",{type:"text",value:u.targetModelGroup,onChange:e=>h({...u,targetModelGroup:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,s.jsx)(lt.pj,{className:"py-0.5 whitespace-nowrap",children:(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:_,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,s.jsx)("button",{onClick:y,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(lt.pj,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,s.jsx)(lt.pj,{className:"py-0.5 text-sm text-gray-500",children:e.targetModelGroup}),(0,s.jsx)(lt.pj,{className:"py-0.5 whitespace-nowrap",children:(0,s.jsxs)("div",{className:"flex space-x-2",children:[(0,s.jsx)("button",{onClick:()=>v(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,s.jsx)(ll.Z,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>b(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,s.jsx)(x.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===o.length&&(0,s.jsx)(lt.SC,{children:(0,s.jsx)(lt.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),(0,s.jsxs)(lt.Zb,{children:[(0,s.jsx)(lt.Dx,{className:"mb-4",children:"Configuration Example"}),(0,s.jsx)(lt.xv,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config.yaml:"}),(0,s.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,s.jsxs)("div",{className:"text-gray-700",children:["router_settings:",(0,s.jsx)("br",{}),"\xa0\xa0model_group_alias:",0===Object.keys(N).length?(0,s.jsxs)("span",{className:"text-gray-500",children:[(0,s.jsx)("br",{}),"\xa0\xa0\xa0\xa0# No aliases configured yet"]}):Object.entries(N).map(e=>{let[l,t]=e;return(0,s.jsxs)("span",{children:[(0,s.jsx)("br",{}),'\xa0\xa0\xa0\xa0"',l,'": "',t,'"']},l)})]})})]})]})]})},la=t(27281),lr=t(57365);let lo=(e,l,t,a,r,o,i,n,c,m,u)=>[{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model ID"}),accessorKey:"model_info.id",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)(_.Z,{title:t.model_info.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>a(t.model_info.id),children:t.model_info.id})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model Information"}),accessorKey:"model_name",size:250,cell:e=>{let{row:l}=e,t=l.original,a=o(l.original)||"-",r=(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Provider:"})," ",t.provider||"-"]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Public Model Name:"})," ",a]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"LiteLLM Model Name:"})," ",t.litellm_model_name||"-"]})]});return(0,s.jsx)(_.Z,{title:r,children:(0,s.jsxs)("div",{className:"flex items-start space-x-2 min-w-0 w-full max-w-[250px]",children:[(0,s.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:t.provider?(0,s.jsx)("img",{src:(0,d.dr)(t.provider).logo,alt:"".concat(t.provider," logo"),className:"w-4 h-4",onError:e=>{let l=e.target,s=l.parentElement;if(s){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=t.provider)||void 0===a?void 0:a.charAt(0))||"-",s.replaceChild(e,l)}}}):(0,s.jsx)("div",{className:"w-4 h-4 rounded-full bg-gray-200 flex items-center justify-center text-xs",children:"-"})}),(0,s.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate max-w-[210px]",children:a}),(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5 max-w-[210px]",children:t.litellm_model_name||"-"})]})]})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Credentials"}),accessorKey:"litellm_credential_name",size:180,cell:e=>{var l;let{row:t}=e,a=null===(l=t.original.litellm_params)||void 0===l?void 0:l.litellm_credential_name;return a?(0,s.jsx)(_.Z,{title:"Credential: ".concat(a),children:(0,s.jsxs)("div",{className:"flex items-center space-x-2 max-w-[180px]",children:[(0,s.jsx)(X.Z,{className:"w-4 h-4 text-blue-500 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xs truncate",title:a,children:a})]})}):(0,s.jsxs)("div",{className:"flex items-center space-x-2 max-w-[180px]",children:[(0,s.jsx)(X.Z,{className:"w-4 h-4 text-gray-300 flex-shrink-0"}),(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"No credentials"})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Created By"}),accessorKey:"model_info.created_by",sortingFn:"datetime",size:160,cell:e=>{let{row:l}=e,t=l.original,a=t.model_info.created_by,r=t.model_info.created_at?new Date(t.model_info.created_at).toLocaleDateString():null;return(0,s.jsxs)("div",{className:"flex flex-col min-w-0 max-w-[160px]",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-gray-900 truncate",title:a||"Unknown",children:a||"Unknown"}),(0,s.jsx)("div",{className:"text-xs text-gray-500 truncate mt-0.5",title:r||"Unknown date",children:r||"Unknown date"})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Updated At"}),accessorKey:"model_info.updated_at",sortingFn:"datetime",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)("span",{className:"text-xs",children:t.model_info.updated_at?new Date(t.model_info.updated_at).toLocaleDateString():"-"})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Costs"}),accessorKey:"input_cost",size:120,cell:e=>{let{row:l}=e,t=l.original,a=t.input_cost,r=t.output_cost;return a||r?(0,s.jsx)(_.Z,{title:"Cost per 1M tokens",children:(0,s.jsxs)("div",{className:"flex flex-col min-w-0 max-w-[120px]",children:[a&&(0,s.jsxs)("div",{className:"text-xs font-medium text-gray-900 truncate",children:["In: $",a]}),r&&(0,s.jsxs)("div",{className:"text-xs text-gray-500 truncate mt-0.5",children:["Out: $",r]})]})}):(0,s.jsx)("div",{className:"max-w-[120px]",children:(0,s.jsx)("span",{className:"text-xs text-gray-400",children:"-"})})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Team ID"}),accessorKey:"model_info.team_id",cell:e=>{let{row:l}=e,t=l.original;return t.model_info.team_id?(0,s.jsx)("div",{className:"overflow-hidden",children:(0,s.jsx)(_.Z,{title:t.model_info.team_id,children:(0,s.jsxs)(H.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:()=>r(t.model_info.team_id),children:[t.model_info.team_id.slice(0,7),"..."]})})}):"-"}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Model Access Group"}),accessorKey:"model_info.model_access_group",enableSorting:!1,cell:e=>{let{row:l}=e,t=l.original,a=t.model_info.access_groups;if(!a||0===a.length)return"-";let r=t.model_info.id,o=m.has(r),i=a.length>1,n=()=>{let e=new Set(m);o?e.delete(r):e.add(r),u(e)};return(0,s.jsxs)("div",{className:"flex items-center gap-1 overflow-hidden",children:[(0,s.jsx)(eX.Z,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:a[0]}),(o||!i&&2===a.length)&&a.slice(1).map((e,l)=>(0,s.jsx)(eX.Z,{size:"xs",color:"blue",className:"text-xs px-1.5 py-0.5 h-5 leading-tight flex-shrink-0",children:e},l+1)),i&&(0,s.jsx)("button",{onClick:e=>{e.stopPropagation(),n()},className:"text-xs text-blue-600 hover:text-blue-800 px-1 py-0.5 rounded hover:bg-blue-50 h-5 leading-tight flex-shrink-0 whitespace-nowrap",children:o?"−":"+".concat(a.length-1)})]})}},{header:()=>(0,s.jsx)("span",{className:"text-sm font-semibold",children:"Status"}),accessorKey:"model_info.db_model",cell:e=>{let{row:l}=e,t=l.original;return(0,s.jsx)("div",{className:"\n inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium\n ".concat(t.model_info.db_model?"bg-blue-50 text-blue-600":"bg-gray-100 text-gray-600","\n "),children:t.model_info.db_model?"DB Model":"Config Model"})}},{id:"actions",header:"",cell:t=>{var r;let{row:o}=t,i=o.original,n="Admin"===e||(null===(r=i.model_info)||void 0===r?void 0:r.created_by)===l;return(0,s.jsx)("div",{className:"flex items-center justify-end gap-2 pr-4",children:(0,s.jsx)(V.Z,{icon:x.Z,size:"sm",onClick:()=>{n&&(a(i.model_info.id),c(!1))},className:n?"cursor-pointer":"opacity-50 cursor-not-allowed"})})}}];var li=t(11318),ln=t(80443),ld=e=>{let{selectedModelGroup:l,setSelectedModelGroup:t,availableModelGroups:r,availableModelAccessGroups:n,setSelectedModelId:d,setSelectedTeamId:c,setEditModel:m,modelData:u}=e,{userId:h,userRole:p,premiumUser:x}=(0,ln.Z)(),{teams:g}=(0,li.Z)(),[f,j]=(0,a.useState)(""),[v,_]=(0,a.useState)("current_team"),[y,b]=(0,a.useState)("personal"),[N,w]=(0,a.useState)(!1),[k,Z]=(0,a.useState)(null),[C,S]=(0,a.useState)(new Set),[A,I]=(0,a.useState)({pageIndex:0,pageSize:50}),E=(0,a.useRef)(null),P=(0,a.useMemo)(()=>u&&u.data&&0!==u.data.length?u.data.filter(e=>{var t,s,a,r,o;let i=""===f||e.model_name.toLowerCase().includes(f.toLowerCase()),n="all"===l||e.model_name===l||!l||"wildcard"===l&&(null===(t=e.model_name)||void 0===t?void 0:t.includes("*")),d="all"===k||(null===(s=e.model_info.access_groups)||void 0===s?void 0:s.includes(k))||!k,c=!0;return"current_team"===v&&(c="personal"===y?(null===(a=e.model_info)||void 0===a?void 0:a.direct_access)===!0:(null===(o=e.model_info)||void 0===o?void 0:null===(r=o.access_via_team_ids)||void 0===r?void 0:r.includes(y))===!0),i&&n&&d&&c}):[],[u,f,l,k,y,v]),M=(0,a.useMemo)(()=>{let e=A.pageIndex*A.pageSize,l=e+A.pageSize;return P.slice(e,l)},[P,A.pageIndex,A.pageSize]);return(0,a.useEffect)(()=>{I(e=>({...e,pageIndex:0}))},[f,l,k,y,v]),(0,s.jsx)(B.Z,{children:(0,s.jsx)(o.Z,{children:(0,s.jsx)("div",{className:"flex flex-col space-y-4",children:(0,s.jsxs)("div",{className:"bg-white rounded-lg shadow",children:[(0,s.jsxs)("div",{className:"border-b px-6 py-4 bg-gray-50",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(i.Z,{className:"text-lg font-semibold text-gray-900",children:"Current Team:"}),(0,s.jsxs)(la.Z,{className:"w-80",defaultValue:"personal",value:y,onValueChange:e=>b(e),children:[(0,s.jsx)(lr.Z,{value:"personal",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"Personal"})]})}),null==g?void 0:g.filter(e=>e.team_id).map(e=>(0,s.jsx)(lr.Z,{value:e.team_id,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:e.team_alias?"".concat(e.team_alias.slice(0,30),"..."):"Team ".concat(e.team_id.slice(0,30),"...")})]})},e.team_id))]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsx)(i.Z,{className:"text-lg font-semibold text-gray-900",children:"View:"}),(0,s.jsxs)(la.Z,{className:"w-64",defaultValue:"current_team",value:v,onValueChange:e=>_(e),children:[(0,s.jsx)(lr.Z,{value:"current_team",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-purple-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"Current Team Models"})]})}),(0,s.jsx)(lr.Z,{value:"all",children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 bg-gray-500 rounded-full"}),(0,s.jsx)("span",{className:"font-medium",children:"All Available Models"})]})})]})]})]}),"current_team"===v&&(0,s.jsxs)("div",{className:"flex items-start gap-2 mt-3",children:[(0,s.jsx)(el.Z,{className:"text-gray-400 mt-0.5 flex-shrink-0 text-xs"}),(0,s.jsx)("div",{className:"text-xs text-gray-500",children:"personal"===y?(0,s.jsxs)("span",{children:["To access these models: Create a Virtual Key without selecting a team on the"," ",(0,s.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]}):(0,s.jsxs)("span",{children:['To access these models: Create a Virtual Key and select Team as "',y,'" on the'," ",(0,s.jsx)("a",{href:"/public?login=success&page=api-keys",className:"text-gray-600 hover:text-gray-800 underline",children:"Virtual Keys page"})]})})]})]}),(0,s.jsx)("div",{className:"border-b px-6 py-4",children:(0,s.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("div",{className:"relative w-64",children:[(0,s.jsx)("input",{type:"text",placeholder:"Search model names...",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:f,onChange:e=>j(e.target.value)}),(0,s.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,s.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,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ".concat(N?"bg-gray-100":""),onClick:()=>w(!N),children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.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"})}),"Filters"]}),(0,s.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:()=>{j(""),t("all"),Z(null),b("personal"),_("current_team"),I({pageIndex:0,pageSize:50})},children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.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"})}),"Reset Filters"]})]}),N&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,s.jsx)("div",{className:"w-64",children:(0,s.jsxs)(la.Z,{value:null!=l?l:"all",onValueChange:e=>t("all"===e?"all":e),placeholder:"Filter by Public Model Name",children:[(0,s.jsx)(lr.Z,{value:"all",children:"All Models"}),(0,s.jsx)(lr.Z,{value:"wildcard",children:"Wildcard Models (*)"}),r.map((e,l)=>(0,s.jsx)(lr.Z,{value:e,children:e},l))]})}),(0,s.jsx)("div",{className:"w-64",children:(0,s.jsxs)(la.Z,{value:null!=k?k:"all",onValueChange:e=>Z("all"===e?null:e),placeholder:"Filter by Model Access Group",children:[(0,s.jsx)(lr.Z,{value:"all",children:"All Model Access Groups"}),n.map((e,l)=>(0,s.jsx)(lr.Z,{value:e,children:e},l))]})})]}),(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)("span",{className:"text-sm text-gray-700",children:P.length>0?"Showing ".concat(A.pageIndex*A.pageSize+1," - ").concat(Math.min((A.pageIndex+1)*A.pageSize,P.length)," of ").concat(P.length," results"):"Showing 0 results"}),P.length>A.pageSize&&(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("button",{onClick:()=>I(e=>({...e,pageIndex:e.pageIndex-1})),disabled:0===A.pageIndex,className:"px-3 py-1 text-sm border rounded-md ".concat(0===A.pageIndex?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Previous"}),(0,s.jsx)("button",{onClick:()=>I(e=>({...e,pageIndex:e.pageIndex+1})),disabled:A.pageIndex>=Math.ceil(P.length/A.pageSize)-1,className:"px-3 py-1 text-sm border rounded-md ".concat(A.pageIndex>=Math.ceil(P.length/A.pageSize)-1?"bg-gray-100 text-gray-400 cursor-not-allowed":"hover:bg-gray-50"),children:"Next"})]})]})]})}),(0,s.jsx)(e0.C,{columns:lo(p,h,x,d,c,O,()=>{},()=>{},m,C,S),data:M,isLoading:!1,table:E})]})})})})},lc=t(93142),lm=t(867),lu=t(3810),lh=t(89245),lp=t(5540),lx=t(8881);let{Text:lg}=g.default;var lf=e=>{let{accessToken:l,onReloadSuccess:t,buttonText:r="Reload Price Data",showIcon:o=!0,size:i="middle",type:d="primary",className:m=""}=e,[u,h]=(0,a.useState)(!1),[p,x]=(0,a.useState)(!1),[g,f]=(0,a.useState)(!1),[v,_]=(0,a.useState)(!1),[b,N]=(0,a.useState)(6),[w,k]=(0,a.useState)(null),[Z,C]=(0,a.useState)(!1);(0,a.useEffect)(()=>{S();let e=setInterval(()=>{S()},3e4);return()=>clearInterval(e)},[l]);let S=async()=>{if(l){C(!0);try{console.log("Fetching reload status...");let e=await (0,n.getModelCostMapReloadStatus)(l);console.log("Received status:",e),k(e)}catch(e){console.error("Failed to fetch reload status:",e),k({scheduled:!1,interval_hours:null,last_run:null,next_run:null})}finally{C(!1)}}},A=async()=>{if(!l){c.Z.fromBackend("No access token available");return}h(!0);try{let e=await (0,n.reloadModelCostMap)(l);"success"===e.status?(c.Z.success("Price data reloaded successfully! ".concat(e.models_count||0," models updated.")),null==t||t(),await S()):c.Z.fromBackend("Failed to reload price data")}catch(e){console.error("Error reloading price data:",e),c.Z.fromBackend("Failed to reload price data. Please try again.")}finally{h(!1)}},I=async()=>{if(!l){c.Z.fromBackend("No access token available");return}if(b<=0){c.Z.fromBackend("Hours must be greater than 0");return}x(!0);try{let e=await (0,n.scheduleModelCostMapReload)(l,b);"success"===e.status?(c.Z.success("Periodic reload scheduled for every ".concat(b," hours")),_(!1),await S()):c.Z.fromBackend("Failed to schedule periodic reload")}catch(e){console.error("Error scheduling reload:",e),c.Z.fromBackend("Failed to schedule periodic reload. Please try again.")}finally{x(!1)}},E=async()=>{if(!l){c.Z.fromBackend("No access token available");return}f(!0);try{let e=await (0,n.cancelModelCostMapReload)(l);"success"===e.status?(c.Z.success("Periodic reload cancelled successfully"),await S()):c.Z.fromBackend("Failed to cancel periodic reload")}catch(e){console.error("Error cancelling reload:",e),c.Z.fromBackend("Failed to cancel periodic reload. Please try again.")}finally{f(!1)}},P=e=>{if(!e)return"Never";try{return new Date(e).toLocaleString()}catch(l){return e}};return(0,s.jsxs)("div",{className:m,children:[(0,s.jsxs)(lc.Z,{direction:"horizontal",size:"middle",style:{marginBottom:16},children:[(0,s.jsx)(lm.Z,{title:"Hard Refresh Price Data",description:"This will immediately fetch the latest pricing information from the remote source. Continue?",onConfirm:A,okText:"Yes",cancelText:"No",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"}},children:(0,s.jsx)(y.ZP,{type:d,size:i,loading:u,icon:o?(0,s.jsx)(lh.Z,{}):void 0,style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem",transition:"all 0.2s ease-in-out"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#4f46e5"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="#6366f1"},children:r})}),(null==w?void 0:w.scheduled)?(0,s.jsx)(y.ZP,{type:"default",size:i,danger:!0,icon:(0,s.jsx)(lx.Z,{}),loading:g,onClick:E,style:{borderColor:"#ff4d4f",color:"#ff4d4f",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Cancel Periodic Reload"}):(0,s.jsx)(y.ZP,{type:"default",size:i,icon:(0,s.jsx)(lp.Z,{}),onClick:()=>_(!0),style:{borderColor:"#d9d9d9",color:"#6366f1",fontWeight:"500",borderRadius:"0.375rem",padding:"0.375rem 0.75rem",height:"auto",fontSize:"0.875rem",lineHeight:"1.25rem"},children:"Set Up Periodic Reload"})]}),w&&(0,s.jsx)(ex.Z,{size:"small",style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:8},children:(0,s.jsxs)(lc.Z,{direction:"vertical",size:"small",style:{width:"100%"},children:[w.scheduled?(0,s.jsx)("div",{children:(0,s.jsxs)(lu.Z,{color:"green",icon:(0,s.jsx)(lp.Z,{}),children:["Scheduled every ",w.interval_hours," hours"]})}):(0,s.jsx)(lg,{type:"secondary",children:"No periodic reload scheduled"}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(lg,{type:"secondary",style:{fontSize:"12px"},children:"Last run:"}),(0,s.jsx)(lg,{style:{fontSize:"12px"},children:P(w.last_run)})]}),w.scheduled&&(0,s.jsxs)(s.Fragment,{children:[w.next_run&&(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(lg,{type:"secondary",style:{fontSize:"12px"},children:"Next run:"}),(0,s.jsx)(lg,{style:{fontSize:"12px"},children:P(w.next_run)})]}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,s.jsx)(lg,{type:"secondary",style:{fontSize:"12px"},children:"Status:"}),(0,s.jsx)(lu.Z,{color:(null==w?void 0:w.scheduled)?w.last_run?"success":"processing":"default",children:(null==w?void 0:w.scheduled)?w.last_run?"Active":"Ready":"Not scheduled"})]})]})]})}),(0,s.jsxs)(j.Z,{title:"Set Up Periodic Reload",open:v,onOk:I,onCancel:()=>_(!1),confirmLoading:p,okText:"Schedule",cancelText:"Cancel",okButtonProps:{style:{backgroundColor:"#6366f1",borderColor:"#6366f1",color:"white"}},children:[(0,s.jsx)("div",{style:{marginBottom:16},children:(0,s.jsx)(lg,{children:"Set up automatic reload of price data every:"})}),(0,s.jsx)("div",{style:{marginBottom:16},children:(0,s.jsx)(eg.Z,{min:1,max:168,value:b,onChange:e=>N(e||6),addonAfter:"hours",style:{width:"100%"}})}),(0,s.jsx)("div",{children:(0,s.jsxs)(lg,{type:"secondary",children:["This will automatically fetch the latest pricing data from the remote source every ",b," hours."]})})]})]})},lj=e=>{let{setModelMap:l}=e,{accessToken:t}=(0,ln.Z)();return(0,s.jsx)(B.Z,{children:(0,s.jsxs)("div",{className:"p-6",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(J.Z,{children:"Price Data Management"}),(0,s.jsx)(i.Z,{className:"text-tremor-content",children:"Manage model pricing data and configure automatic reload schedules"})]}),(0,s.jsx)(lf,{accessToken:t,onReloadSuccess:()=>{(async()=>{l(await (0,n.modelCostMap)(t))})()},buttonText:"Reload Price Data",size:"middle",type:"primary",className:"w-full"})]})})};let lv={"BadRequestError (400)":"BadRequestErrorRetries","AuthenticationError (401)":"AuthenticationErrorRetries","TimeoutError (408)":"TimeoutErrorRetries","RateLimitError (429)":"RateLimitErrorRetries","ContentPolicyViolationError (400)":"ContentPolicyViolationErrorRetries","InternalServerError (500)":"InternalServerErrorRetries"};var l_=e=>{let{selectedModelGroup:l,setSelectedModelGroup:t,availableModelGroups:a,globalRetryPolicy:r,setGlobalRetryPolicy:o,defaultRetry:n,modelGroupRetryPolicy:d,setModelGroupRetryPolicy:c,handleSaveRetrySettings:m}=e;return(0,s.jsxs)(B.Z,{children:[(0,s.jsx)("div",{className:"flex items-center gap-4 mb-6",children:(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)(i.Z,{children:"Retry Policy Scope:"}),(0,s.jsxs)(la.Z,{className:"ml-2 w-48",defaultValue:"global",value:"global"===l?"global":l||a[0],onValueChange:e=>t(e),children:[(0,s.jsx)(lr.Z,{value:"global",children:"Global Default"}),a.map((e,l)=>(0,s.jsx)(lr.Z,{value:e,onClick:()=>t(e),children:e},l))]})]})}),"global"===l?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(J.Z,{children:"Global Retry Policy"}),(0,s.jsx)(i.Z,{className:"mb-6",children:"Default retry settings applied to all model groups unless overridden"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(J.Z,{children:["Retry Policy for ",l]}),(0,s.jsx)(i.Z,{className:"mb-6",children:"Model-specific retry settings. Falls back to global defaults if not set."})]}),lv&&(0,s.jsx)("table",{children:(0,s.jsx)("tbody",{children:Object.entries(lv).map((e,t)=>{var a,m,u,h;let p,[x,g]=e;if("global"===l)p=null!==(a=null==r?void 0:r[g])&&void 0!==a?a:n;else{let e=null==d?void 0:null===(m=d[l])||void 0===m?void 0:m[g];p=null!=e?e:null!==(u=null==r?void 0:r[g])&&void 0!==u?u:n}return(0,s.jsxs)("tr",{className:"flex justify-between items-center mt-2",children:[(0,s.jsxs)("td",{children:[(0,s.jsx)(i.Z,{children:x}),"global"!==l&&(0,s.jsxs)(i.Z,{className:"text-xs text-gray-500 ml-2",children:["(Global: ",null!==(h=null==r?void 0:r[g])&&void 0!==h?h:n,")"]})]}),(0,s.jsx)("td",{children:(0,s.jsx)(eg.Z,{className:"ml-5",value:p,min:0,step:1,onChange:e=>{"global"===l?o(l=>null==e?l:{...null!=l?l:{},[g]:e}):c(t=>{var s;let a=null!==(s=null==t?void 0:t[l])&&void 0!==s?s:{};return{...null!=t?t:{},[l]:{...a,[g]:e}}})}})})]},t)})})}),(0,s.jsx)(H.Z,{className:"mt-6 mr-8",onClick:m,children:"Save"})]})},ly=t(75105),lb=t(40278),lN=t(97765),lw=t(21626),lk=t(97214),lZ=t(28241),lC=t(58834),lS=t(69552),lA=t(71876),lI=t(39789),lE=t(79326),lP=t(2356),lM=t(59664),lF=e=>{let{modelMetrics:l,modelMetricsCategories:t,customTooltip:a,premiumUser:r}=e;return(0,s.jsx)(lM.Z,{title:"Time to First token (s)",className:"h-72",data:l,index:"date",showLegend:!1,categories:t,colors:["indigo","rose"],connectNulls:!0,customTooltip:a})},lL=e=>{let{setSelectedAPIKey:l,keys:t,teams:r,setSelectedCustomer:o,allEndUsers:n}=e,{premiumUser:d}=(0,ln.Z)(),[c,m]=(0,a.useState)(null);return(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"mb-1",children:"Select API Key Name"}),d?(0,s.jsxs)("div",{children:[(0,s.jsxs)(la.Z,{defaultValue:"all-keys",children:[(0,s.jsx)(lr.Z,{value:"all-keys",onClick:()=>{l(null)},children:"All Keys"},"all-keys"),null==t?void 0:t.map((e,t)=>e&&null!==e.key_alias&&e.key_alias.length>0?(0,s.jsx)(lr.Z,{value:String(t),onClick:()=>{l(e)},children:e.key_alias},t):null)]}),(0,s.jsx)(i.Z,{className:"mt-1",children:"Select Customer Name"}),(0,s.jsxs)(la.Z,{defaultValue:"all-customers",children:[(0,s.jsx)(lr.Z,{value:"all-customers",onClick:()=>{o(null)},children:"All Customers"},"all-customers"),null==n?void 0:n.map((e,l)=>(0,s.jsx)(lr.Z,{value:e,onClick:()=>{o(e)},children:e},l))]}),(0,s.jsx)(i.Z,{className:"mt-1",children:"Select Team"}),(0,s.jsxs)(la.Z,{className:"w-64 relative z-50",defaultValue:"all",value:null!=c?c:"all",onValueChange:e=>m("all"===e?null:e),children:[(0,s.jsx)(lr.Z,{value:"all",children:"All Teams"}),null==r?void 0:r.filter(e=>e.team_id).map(e=>(0,s.jsx)(lr.Z,{value:e.team_id,children:e.team_alias?"".concat(e.team_alias," (").concat(e.team_id.slice(0,8),"...)"):"Team ".concat(e.team_id.slice(0,8),"...")},e.team_id))]})]}):(0,s.jsxs)("div",{children:[(0,s.jsx)(i.Z,{className:"mt-1",children:"Select Team"}),(0,s.jsxs)(la.Z,{className:"w-64 relative z-50",defaultValue:"all",value:null!=c?c:"all",onValueChange:e=>m("all"===e?null:e),children:[(0,s.jsx)(lr.Z,{value:"all",children:"All Teams"}),null==r?void 0:r.filter(e=>e.team_id).map(e=>(0,s.jsx)(lr.Z,{value:e.team_id,children:e.team_alias?"".concat(e.team_alias," (").concat(e.team_id.slice(0,8),"...)"):"Team ".concat(e.team_id.slice(0,8),"...")},e.team_id))]})]})]})},lT=e=>{let{dateValue:l,setDateValue:t,selectedModelGroup:d,availableModelGroups:c,setShowAdvancedFilters:m,modelMetrics:u,modelMetricsCategories:h,streamingModelMetrics:p,streamingModelMetricsCategories:x,customTooltip:g,slowResponsesData:f,modelExceptions:j,globalExceptionData:v,allExceptions:_,globalExceptionPerDeployment:y,setSelectedAPIKey:b,keys:N,setSelectedCustomer:w,teams:k,allEndUsers:Z,selectedAPIKey:C,selectedCustomer:S,selectedTeam:A,setSelectedModelGroup:I,setModelMetrics:E,setModelMetricsCategories:P,setStreamingModelMetrics:M,setStreamingModelMetricsCategories:F,setSlowResponsesData:L,setModelExceptions:T,setAllExceptions:R,setGlobalExceptionData:O,setGlobalExceptionPerDeployment:V}=e,{accessToken:U,userId:G,userRole:Y,premiumUser:$}=(0,ln.Z)();(0,a.useEffect)(()=>{Q(d,l.from,l.to)},[C,S,A]);let Q=async(e,l,t)=>{if(console.log("Updating model metrics for group:",e),!U||!G||!Y||!l||!t)return;console.log("inside updateModelMetrics - startTime:",l,"endTime:",t),I(e);let s=null==C?void 0:C.token;void 0===s&&(s=null);let a=S;void 0===a&&(a=null);try{let r=await (0,n.modelMetricsCall)(U,G,Y,e,l.toISOString(),t.toISOString(),s,a);console.log("Model metrics response:",r),E(r.data),P(r.all_api_bases);let o=await (0,n.streamingModelMetricsCall)(U,e,l.toISOString(),t.toISOString());M(o.data),F(o.all_api_bases);let i=await (0,n.modelExceptionsCall)(U,G,Y,e,l.toISOString(),t.toISOString(),s,a);console.log("Model exceptions response:",i),T(i.data),R(i.exception_types);let d=await (0,n.modelMetricsSlowResponsesCall)(U,G,Y,e,l.toISOString(),t.toISOString(),s,a);if(console.log("slowResponses:",d),L(d),e){let s=await (0,n.adminGlobalActivityExceptions)(U,null==l?void 0:l.toISOString().split("T")[0],null==t?void 0:t.toISOString().split("T")[0],e);O(s);let a=await (0,n.adminGlobalActivityExceptionsPerDeployment)(U,null==l?void 0:l.toISOString().split("T")[0],null==t?void 0:t.toISOString().split("T")[0],e);V(a)}}catch(e){console.error("Failed to fetch model metrics",e)}};return(0,s.jsxs)(B.Z,{children:[(0,s.jsxs)(o.Z,{numItems:4,className:"mt-2 mb-2",children:[(0,s.jsx)(r.Z,{children:(0,s.jsx)(lI.Z,{value:l,className:"mr-2",onValueChange:e=>{t(e),Q(d,e.from,e.to)}})}),(0,s.jsxs)(r.Z,{className:"ml-2",children:[(0,s.jsx)(i.Z,{children:"Select Model Group"}),(0,s.jsx)(la.Z,{defaultValue:d||c[0],value:d||c[0],children:c.map((e,t)=>(0,s.jsx)(lr.Z,{value:e,onClick:()=>Q(e,l.from,l.to),children:e},t))})]}),(0,s.jsx)(r.Z,{children:(0,s.jsx)(lE.Z,{trigger:"click",content:(0,s.jsx)(lL,{allEndUsers:Z,keys:N,setSelectedAPIKey:b,setSelectedCustomer:w,teams:k}),overlayStyle:{width:"20vw"},children:(0,s.jsx)(H.Z,{icon:lP.Z,size:"md",variant:"secondary",className:"mt-4 ml-2",style:{border:"none"},onClick:()=>m(!0)})})})]}),(0,s.jsxs)(o.Z,{numItems:2,children:[(0,s.jsx)(r.Z,{children:(0,s.jsx)(W.Z,{className:"mr-2 max-h-[400px] min-h-[400px]",children:(0,s.jsxs)(q.Z,{children:[(0,s.jsxs)(z.Z,{variant:"line",defaultValue:"1",children:[(0,s.jsx)(D.Z,{value:"1",children:"Avg. Latency per Token"}),(0,s.jsx)(D.Z,{value:"2",children:"Time to first token"})]}),(0,s.jsxs)(K.Z,{children:[(0,s.jsxs)(B.Z,{children:[(0,s.jsx)("p",{className:"text-gray-500 italic",children:" (seconds/token)"}),(0,s.jsx)(i.Z,{className:"text-gray-500 italic mt-1 mb-1",children:"average Latency for successfull requests divided by the total tokens"}),u&&h&&(0,s.jsx)(ly.Z,{title:"Model Latency",className:"h-72",data:u,showLegend:!1,index:"date",categories:h,connectNulls:!0,customTooltip:g})]}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(lF,{modelMetrics:p,modelMetricsCategories:x,customTooltip:g,premiumUser:$})})]})]})})}),(0,s.jsx)(r.Z,{children:(0,s.jsx)(W.Z,{className:"ml-2 max-h-[400px] min-h-[400px] overflow-y-auto",children:(0,s.jsxs)(lw.Z,{children:[(0,s.jsx)(lC.Z,{children:(0,s.jsxs)(lA.Z,{children:[(0,s.jsx)(lS.Z,{children:"Deployment"}),(0,s.jsx)(lS.Z,{children:"Success Responses"}),(0,s.jsxs)(lS.Z,{children:["Slow Responses ",(0,s.jsx)("p",{children:"Success Responses taking 600+s"})]})]})}),(0,s.jsx)(lk.Z,{children:f.map((e,l)=>(0,s.jsxs)(lA.Z,{children:[(0,s.jsx)(lZ.Z,{children:e.api_base}),(0,s.jsx)(lZ.Z,{children:e.total_count}),(0,s.jsx)(lZ.Z,{children:e.slow_count})]},l))})]})})})]}),(0,s.jsx)(o.Z,{numItems:1,className:"gap-2 w-full mt-2",children:(0,s.jsxs)(W.Z,{children:[(0,s.jsxs)(J.Z,{children:["All Exceptions for ",d]}),(0,s.jsx)(lb.Z,{className:"h-60",data:j,index:"model",categories:_,stack:!0,yAxisWidth:30})]})}),(0,s.jsxs)(o.Z,{numItems:1,className:"gap-2 w-full mt-2",children:[(0,s.jsxs)(W.Z,{children:[(0,s.jsxs)(J.Z,{children:["All Up Rate Limit Errors (429) for ",d]}),(0,s.jsxs)(o.Z,{numItems:1,children:[(0,s.jsxs)(r.Z,{children:[(0,s.jsxs)(lN.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Num Rate Limit Errors ",v.sum_num_rate_limit_exceptions]}),(0,s.jsx)(lb.Z,{className:"h-40",data:v.daily_data,index:"date",colors:["rose"],categories:["num_rate_limit_exceptions"],onValueChange:e=>console.log(e)})]}),(0,s.jsx)(r.Z,{})]})]}),$?(0,s.jsx)(s.Fragment,{children:y.map((e,l)=>(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(J.Z,{children:e.api_base?e.api_base:"Unknown API Base"}),(0,s.jsx)(o.Z,{numItems:1,children:(0,s.jsxs)(r.Z,{children:[(0,s.jsxs)(lN.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Num Rate Limit Errors (429) ",e.sum_num_rate_limit_exceptions]}),(0,s.jsx)(lb.Z,{className:"h-40",data:e.daily_data,index:"date",colors:["rose"],categories:["num_rate_limit_exceptions"],onValueChange:e=>console.log(e)})]})})]},l))}):(0,s.jsx)(s.Fragment,{children:y&&y.length>0&&y.slice(0,1).map((e,l)=>(0,s.jsxs)(W.Z,{children:[(0,s.jsx)(J.Z,{children:"✨ Rate Limit Errors by Deployment"}),(0,s.jsx)("p",{className:"mb-2 text-gray-500 italic text-[12px]",children:"Upgrade to see exceptions for all deployments"}),(0,s.jsx)(H.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)(W.Z,{children:[(0,s.jsx)(J.Z,{children:e.api_base}),(0,s.jsx)(o.Z,{numItems:1,children:(0,s.jsxs)(r.Z,{children:[(0,s.jsxs)(lN.Z,{style:{fontSize:"15px",fontWeight:"normal",color:"#535452"},children:["Num Rate Limit Errors ",e.sum_num_rate_limit_exceptions]}),(0,s.jsx)(lb.Z,{className:"h-40",data:e.daily_data,index:"date",colors:["rose"],categories:["num_rate_limit_exceptions"],onValueChange:e=>console.log(e)})]})})]})]},l))})]})]})},lR=e=>{let{accessToken:l,token:t,userRole:m,userID:h,modelData:p={data:[]},keys:x,setModelData:j,premiumUser:v,teams:_}=e,[y]=f.Z.useForm(),[b,N]=(0,a.useState)(null),[w,k]=(0,a.useState)(""),[Z,C]=(0,a.useState)([]),[S,A]=(0,a.useState)([]),[I,E]=(0,a.useState)(d.Cl.OpenAI),[P,M]=(0,a.useState)(!1),[F,L]=(0,a.useState)(null),[T,H]=(0,a.useState)([]),[W,Y]=(0,a.useState)([]),[J,$]=(0,a.useState)(null),[Q,X]=(0,a.useState)([]),[ee,el]=(0,a.useState)([]),[et,es]=(0,a.useState)([]),[ea,er]=(0,a.useState)([]),[eo,ei]=(0,a.useState)([]),[en,ed]=(0,a.useState)([]),[ec,em]=(0,a.useState)([]),[eu,eh]=(0,a.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[ep,ex]=(0,a.useState)(null),[eg,ef]=(0,a.useState)(null),[ej,ev]=(0,a.useState)(0),[e_,ey]=(0,a.useState)({}),[eb,eN]=(0,a.useState)([]),[ek,eZ]=(0,a.useState)(!1),[eC,eS]=(0,a.useState)(null),[eA,eI]=(0,a.useState)(null),[eE,eP]=(0,a.useState)([]),[eM,eF]=(0,a.useState)([]),[eL,eT]=(0,a.useState)({}),[eR,eO]=(0,a.useState)(!1),[eV,eD]=(0,a.useState)(null),[eq,ez]=(0,a.useState)(!1),[eB,eK]=(0,a.useState)(null),[eG,eH]=(0,a.useState)(null),[eW,eY]=(0,a.useState)(!1),eJ=(0,a.useRef)(null),[e$,eX]=(0,a.useState)(0),e0=async e=>{try{let l=await (0,n.credentialListCall)(e);console.log("credentials: ".concat(JSON.stringify(l))),eF(l.credentials)}catch(e){console.error("Error fetching credentials:",e)}};(0,a.useEffect)(()=>{let e=e=>{eJ.current&&!eJ.current.contains(e.target)&&eY(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let e1={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;console.log("Resetting vertex_credentials to JSON; jsonStr: ".concat(l)),y.setFieldsValue({vertex_credentials:l}),console.log("Form values right after setting:",y.getFieldsValue())}},l.readAsText(e)}return!1},onChange(e){console.log("Upload onChange triggered with values:",e),console.log("Current form values:",y.getFieldsValue()),"uploading"!==e.file.status&&console.log(e.file,e.fileList),"done"===e.file.status?c.Z.success("".concat(e.file.name," file uploaded successfully")):"error"===e.file.status&&c.Z.fromBackend("".concat(e.file.name," file upload failed."))}},e2=()=>{k(new Date().toLocaleString())},e4=async()=>{if(!l){console.error("Access token is missing");return}try{let e={router_settings:{}};"global"===J?(console.log("Saving global retry policy:",eg),eg&&(e.router_settings.retry_policy=eg),c.Z.success("Global retry settings saved successfully")):(console.log("Saving model group retry policy for",J,":",ep),ep&&(e.router_settings.model_group_retry_policy=ep),c.Z.success("Retry settings saved successfully for ".concat(J))),await (0,n.setCallbacksCall)(l,e)}catch(e){console.error("Failed to save retry settings:",e),c.Z.fromBackend("Failed to save retry settings")}};if((0,a.useEffect)(()=>{if(!l||!t||!m||!h)return;let e=async()=>{try{var e,t,s,a,r,o,i,d,c,u,p,x;let g=await (0,n.modelInfoCall)(l,h,m);console.log("Model data response:",g.data),j(g);let f=await (0,n.modelSettingsCall)(l);f&&A(f);let v=new Set;for(let e=0;e0&&(b=_[_.length-1],console.log("_initial_model_group:",b)),console.log("selectedModelGroup:",J);let N=await (0,n.modelMetricsCall)(l,h,m,b,null===(e=eu.from)||void 0===e?void 0:e.toISOString(),null===(t=eu.to)||void 0===t?void 0:t.toISOString(),null==eC?void 0:eC.token,eA);console.log("Model metrics response:",N),X(N.data),el(N.all_api_bases);let w=await (0,n.streamingModelMetricsCall)(l,b,null===(s=eu.from)||void 0===s?void 0:s.toISOString(),null===(a=eu.to)||void 0===a?void 0:a.toISOString());es(w.data),er(w.all_api_bases);let k=await (0,n.modelExceptionsCall)(l,h,m,b,null===(r=eu.from)||void 0===r?void 0:r.toISOString(),null===(o=eu.to)||void 0===o?void 0:o.toISOString(),null==eC?void 0:eC.token,eA);console.log("Model exceptions response:",k),ei(k.data),ed(k.exception_types);let Z=await (0,n.modelMetricsSlowResponsesCall)(l,h,m,b,null===(i=eu.from)||void 0===i?void 0:i.toISOString(),null===(d=eu.to)||void 0===d?void 0:d.toISOString(),null==eC?void 0:eC.token,eA),C=await (0,n.adminGlobalActivityExceptions)(l,null===(c=eu.from)||void 0===c?void 0:c.toISOString().split("T")[0],null===(u=eu.to)||void 0===u?void 0:u.toISOString().split("T")[0],b);ey(C);let S=await (0,n.adminGlobalActivityExceptionsPerDeployment)(l,null===(p=eu.from)||void 0===p?void 0:p.toISOString().split("T")[0],null===(x=eu.to)||void 0===x?void 0:x.toISOString().split("T")[0],b);eN(S),console.log("dailyExceptions:",C),console.log("dailyExceptionsPerDeplyment:",S),console.log("slowResponses:",Z),em(Z);let I=await (0,n.allEndUsersCall)(l);eP(null==I?void 0:I.map(e=>e.user_id));let E=(await (0,n.getCallbacksCall)(l,h,m)).router_settings;console.log("routerSettingsInfo:",E);let P=E.model_group_retry_policy,M=E.num_retries;console.log("model_group_retry_policy:",P),console.log("default_retries:",M),ex(P),ef(E.retry_policy),ev(M);let F=E.model_group_alias||{};eT(F)}catch(e){console.error("There was an error fetching the model data",e)}};l&&t&&m&&h&&e();let s=async()=>{let e=await (0,n.modelCostMap)(l);console.log("received model cost map data: ".concat(Object.keys(e))),N(e)};null==b&&s(),e2()},[l,t,m,h,b,w,eG]),!p||!l||!t||!m||!h)return(0,s.jsx)("div",{children:"Loading..."});let e5=[],e6=[];for(let e=0;e(console.log("GET PROVIDER CALLED! - ".concat(b)),null!=b&&"object"==typeof b&&e in b)?b[e].litellm_provider:"openai";if(t){let e=t.split("/"),l=e[0];(r=s)||(r=1===e.length?m(t):l)}else r="-";a&&(o=null==a?void 0:a.input_cost_per_token,i=null==a?void 0:a.output_cost_per_token,n=null==a?void 0:a.max_tokens,d=null==a?void 0:a.max_input_tokens),(null==l?void 0:l.litellm_params)&&(c=Object.fromEntries(Object.entries(null==l?void 0:l.litellm_params).filter(e=>{let[l]=e;return"model"!==l&&"api_base"!==l}))),p.data[e].provider=r,p.data[e].input_cost=o,p.data[e].output_cost=i,p.data[e].litellm_model_name=t,e6.push(r),p.data[e].input_cost&&(p.data[e].input_cost=(1e6*Number(p.data[e].input_cost)).toFixed(2)),p.data[e].output_cost&&(p.data[e].output_cost=(1e6*Number(p.data[e].output_cost)).toFixed(2)),p.data[e].max_tokens=n,p.data[e].max_input_tokens=d,p.data[e].api_base=null==l?void 0:null===(le=l.litellm_params)||void 0===le?void 0:le.api_base,p.data[e].cleanedLitellmParams=c,e5.push(l.model_name),console.log(p.data[e])}if(m&&"Admin Viewer"==m){let{Title:e,Paragraph:l}=g.default;return(0,s.jsxs)("div",{children:[(0,s.jsx)(e,{level:1,children:"Access Denied"}),(0,s.jsx)(l,{children:"Ask your proxy admin for access to view all models"})]})}return(console.log("selectedProvider: ".concat(I)),console.log("providerModels.length: ".concat(Z.length)),Object.keys(d.Cl).find(e=>d.Cl[e]===I),eB)?(0,s.jsx)("div",{className:"w-full h-full",children:(0,s.jsx)(G.Z,{teamId:eB,onClose:()=>eK(null),accessToken:l,is_team_admin:"Admin"===m,is_proxy_admin:"Proxy Admin"===m,userModels:e5,editTeam:!1,onUpdate:e2})}):(0,s.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,s.jsx)(o.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,s.jsxs)(r.Z,{numColSpan:1,className:"flex flex-col gap-2",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-4",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Model Management"}),eU.ZL.includes(m)?(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Add and manage models for the proxy"}):(0,s.jsx)("p",{className:"text-sm text-gray-600",children:"Add models for teams you are an admin for."})]})}),eV?(0,s.jsx)(ew,{modelId:eV,editModel:!0,onClose:()=>{eD(null),ez(!1)},modelData:p.data.find(e=>e.model_info.id===eV),accessToken:l,userID:h,userRole:m,setEditModalVisible:M,setSelectedModel:L,onModelUpdate:e=>{j({...p,data:p.data.map(l=>l.model_info.id===e.model_info.id?e:l)}),e2()},modelAccessGroups:W}):(0,s.jsxs)(q.Z,{index:e$,onIndexChange:eX,className:"gap-2 h-[75vh] w-full ",children:[(0,s.jsxs)(z.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,s.jsxs)("div",{className:"flex",children:[eU.ZL.includes(m)?(0,s.jsx)(D.Z,{children:"All Models"}):(0,s.jsx)(D.Z,{children:"Your Models"}),(0,s.jsx)(D.Z,{children:"Add Model"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"LLM Credentials"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Pass-Through Endpoints"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Health Status"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Model Analytics"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Model Retry Settings"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Model Group Alias"}),eU.ZL.includes(m)&&(0,s.jsx)(D.Z,{children:"Price Data Reload"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[w&&(0,s.jsxs)(i.Z,{children:["Last Refreshed: ",w]}),(0,s.jsx)(V.Z,{icon:U.Z,variant:"shadow",size:"xs",className:"self-center",onClick:e2})]})]}),(0,s.jsxs)(K.Z,{children:[(0,s.jsx)(ld,{selectedModelGroup:J,setSelectedModelGroup:$,availableModelGroups:T,availableModelAccessGroups:W,setSelectedModelId:eD,setSelectedTeamId:eK,setEditModel:ez,modelData:p}),(0,s.jsx)(B.Z,{className:"h-full",children:(0,s.jsx)(eQ,{form:y,handleOk:()=>{console.log("\uD83D\uDE80 handleOk called from model dashboard!"),console.log("Current form values:",y.getFieldsValue()),y.validateFields().then(e=>{console.log("✅ Validation passed, submitting:",e),u(e,l,y,e2)}).catch(e=>{var l;console.error("❌ Validation failed:",e),console.error("Form errors:",e.errorFields);let t=(null===(l=e.errorFields)||void 0===l?void 0:l.map(e=>"".concat(e.name.join("."),": ").concat(e.errors.join(", "))).join(" | "))||"Unknown validation error";c.Z.fromBackend("Please fill in the following required fields: ".concat(t))})},selectedProvider:I,setSelectedProvider:E,providerModels:Z,setProviderModelsFn:e=>{let l=(0,d.bK)(e,b);C(l),console.log("providerModels: ".concat(l))},getPlaceholder:d.ph,uploadProps:e1,showAdvancedSettings:eR,setShowAdvancedSettings:eO,teams:_,credentials:eM,accessToken:l,userRole:m,premiumUser:v})}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(R,{accessToken:l,uploadProps:e1,credentialList:eM,fetchCredentials:e0})}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(e8.Z,{accessToken:l,userRole:m,userID:h,modelData:p,premiumUser:v})}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(e3,{accessToken:l,modelData:p,all_models_on_proxy:e5,getDisplayModelName:O,setSelectedModelId:eD})}),(0,s.jsx)(lT,{dateValue:eu,setDateValue:eh,selectedModelGroup:J,availableModelGroups:T,setShowAdvancedFilters:eZ,modelMetrics:Q,modelMetricsCategories:ee,streamingModelMetrics:et,streamingModelMetricsCategories:ea,customTooltip:e=>{var l,t;let{payload:a,active:r}=e;if(!r||!a)return null;let o=null===(t=a[0])||void 0===t?void 0:null===(l=t.payload)||void 0===l?void 0:l.date,i=a.sort((e,l)=>l.value-e.value);if(i.length>5){let e=i.length-5;(i=i.slice(0,5)).push({dataKey:"".concat(e," other deployments"),value:a.slice(5).reduce((e,l)=>e+l.value,0),color:"gray"})}return(0,s.jsxs)("div",{className:"w-150 rounded-tremor-default border border-tremor-border bg-tremor-background p-2 text-tremor-default shadow-tremor-dropdown",children:[o&&(0,s.jsxs)("p",{className:"text-tremor-content-emphasis mb-2",children:["Date: ",o]}),i.map((e,l)=>{let t=parseFloat(e.value.toFixed(5)),a=0===t&&e.value>0?"<0.00001":t.toFixed(5);return(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("div",{className:"w-2 h-2 mt-1 rounded-full bg-".concat(e.color,"-500")}),(0,s.jsx)("p",{className:"text-tremor-content",children:e.dataKey})]}),(0,s.jsx)("p",{className:"font-medium text-tremor-content-emphasis text-righ ml-2",children:a})]},l)})]})},slowResponsesData:ec,modelExceptions:eo,globalExceptionData:e_,allExceptions:en,globalExceptionPerDeployment:eb,allEndUsers:eE,keys:x,setSelectedAPIKey:eS,setSelectedCustomer:eI,teams:_,selectedAPIKey:eC,selectedCustomer:eA,selectedTeam:eG,setAllExceptions:ed,setGlobalExceptionData:ey,setGlobalExceptionPerDeployment:eN,setModelExceptions:ei,setModelMetrics:X,setModelMetricsCategories:el,setSelectedModelGroup:$,setSlowResponsesData:em,setStreamingModelMetrics:es,setStreamingModelMetricsCategories:er}),(0,s.jsx)(l_,{selectedModelGroup:J,setSelectedModelGroup:$,availableModelGroups:T,globalRetryPolicy:eg,setGlobalRetryPolicy:ef,defaultRetry:ej,modelGroupRetryPolicy:ep,setModelGroupRetryPolicy:ex,handleSaveRetrySettings:e4}),(0,s.jsx)(B.Z,{children:(0,s.jsx)(ls,{accessToken:l,initialModelGroupAlias:eL,onAliasUpdate:eT})}),(0,s.jsx)(lj,{setModelMap:N})]})]})]})})})}},7166:function(e,l,t){t.d(l,{Z:function(){return W}});var s=t(57437),a=t(2265),r=t(20831),o=t(47323),i=t(84264),n=t(96761),d=t(19250),c=t(89970),m=t(33866),u=t(15731),h=t(53410),p=t(74998),x=t(92858),g=t(49566),f=t(12514),j=t(97765),v=t(52787),_=t(13634),y=t(82680),b=t(61778),N=t(24199),w=t(12660),k=t(15424),Z=t(93142),C=t(73002),S=t(45246),A=t(96473),I=t(31283),E=e=>{let{value:l={},onChange:t}=e,[r,o]=(0,a.useState)(Object.entries(l)),i=e=>{let l=r.filter((l,t)=>t!==e);o(l),null==t||t(Object.fromEntries(l))},n=(e,l,s)=>{let a=[...r];a[e]=[l,s],o(a),null==t||t(Object.fromEntries(a))};return(0,s.jsxs)("div",{children:[r.map((e,l)=>{let[t,a]=e;return(0,s.jsxs)(Z.Z,{style:{display:"flex",marginBottom:8},align:"center",children:[(0,s.jsx)(I.o,{placeholder:"Header Name",value:t,onChange:e=>n(l,e.target.value,a)}),(0,s.jsx)(I.o,{placeholder:"Header Value",value:a,onChange:e=>n(l,t,e.target.value)}),(0,s.jsx)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,s.jsx)(S.Z,{onClick:()=>i(l),style:{cursor:"pointer"}})})]},l)}),(0,s.jsx)(C.ZP,{type:"dashed",onClick:()=>{o([...r,["",""]])},icon:(0,s.jsx)(A.Z,{}),children:"Add Header"})]})},P=t(77565),M=e=>{let{pathValue:l,targetValue:t,includeSubpath:a}=e,r=(0,d.getProxyBaseUrl)();return l&&t?(0,s.jsxs)(f.Z,{className:"p-5",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Preview"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-5",children:"How your requests will be routed"}),(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"Basic routing:"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint"}),(0,s.jsx)("code",{className:"font-mono text-sm text-gray-900",children:l?"".concat(r).concat(l):""})]}),(0,s.jsx)("div",{className:"text-gray-400",children:(0,s.jsx)(P.Z,{className:"text-lg"})}),(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,s.jsx)("code",{className:"font-mono text-sm text-gray-900",children:t})]})]})]}),a&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-base font-semibold text-gray-900 mb-3",children:"With subpaths:"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Your endpoint + subpath"}),(0,s.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[l&&"".concat(r).concat(l),(0,s.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]}),(0,s.jsx)("div",{className:"text-gray-400",children:(0,s.jsx)(P.Z,{className:"text-lg"})}),(0,s.jsxs)("div",{className:"flex-1 bg-gray-50 border border-gray-200 rounded-lg p-3",children:[(0,s.jsx)("div",{className:"text-sm text-gray-600 mb-2",children:"Forwards to"}),(0,s.jsxs)("code",{className:"font-mono text-sm text-gray-900",children:[t,(0,s.jsx)("span",{className:"text-blue-600",children:"/v1/text-to-image/base/model"})]})]})]}),(0,s.jsxs)("div",{className:"mt-3 text-sm text-gray-600",children:["Any path after ",l," will be appended to the target URL"]})]})}),!a&&(0,s.jsx)("div",{className:"mt-4 p-3 bg-blue-50 rounded-md border border-blue-200",children:(0,s.jsxs)("div",{className:"flex items-start",children:[(0,s.jsx)(k.Z,{className:"text-blue-500 mt-0.5 mr-2 flex-shrink-0"}),(0,s.jsxs)("div",{className:"text-sm text-blue-700",children:[(0,s.jsx)("span",{className:"font-medium",children:"Not seeing the routing you wanted?"})," Try enabling - Include Subpaths - above - this allows subroutes like"," ",(0,s.jsx)("code",{className:"bg-blue-100 px-1 py-0.5 rounded font-mono text-xs",children:"/api/v1/models"})," to be forwarded automatically."]})]})})]})]}):null},F=t(9114),L=t(63709),T=e=>{let{premiumUser:l,authEnabled:t,onAuthChange:a}=e;return(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Security"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-4",children:"When enabled, requests to this endpoint will require a valid LiteLLM API key"}),l?(0,s.jsx)(_.Z.Item,{name:"auth",valuePropName:"checked",className:"mb-0",children:(0,s.jsx)(L.Z,{checked:t,onChange:e=>{a(e)}})}):(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center mb-3",children:[(0,s.jsx)(L.Z,{disabled:!0,checked:!1,style:{outline:"2px solid #d1d5db",outlineOffset:"2px"}}),(0,s.jsx)("span",{className:"ml-2 text-sm text-gray-400",children:"Authentication (Premium)"})]}),(0,s.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,s.jsxs)(i.Z,{className:"text-sm text-yellow-800",children:["Setting authentication for pass-through endpoints is a LiteLLM Enterprise feature. Get a trial key"," ",(0,s.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})]})};let{Option:R}=v.default;var O=e=>{let{accessToken:l,setPassThroughItems:t,passThroughItems:o,premiumUser:i=!1}=e,[m]=_.Z.useForm(),[u,h]=(0,a.useState)(!1),[p,v]=(0,a.useState)(!1),[Z,C]=(0,a.useState)(""),[S,A]=(0,a.useState)(""),[I,P]=(0,a.useState)(""),[L,R]=(0,a.useState)(!0),[O,V]=(0,a.useState)(!1),D=()=>{m.resetFields(),A(""),P(""),R(!0),h(!1)},q=e=>{let l=e;e&&!e.startsWith("/")&&(l="/"+e),A(l),m.setFieldsValue({path:l})},z=async e=>{console.log("addPassThrough called with:",e),v(!0);try{!i&&"auth"in e&&delete e.auth,console.log("formValues: ".concat(JSON.stringify(e)));let s=(await (0,d.createPassThroughEndpoint)(l,e)).endpoints[0],a=[...o,s];t(a),F.Z.success("Pass-through endpoint created successfully"),m.resetFields(),A(""),P(""),R(!0),h(!1)}catch(e){F.Z.fromBackend("Error creating pass-through endpoint: "+e)}finally{v(!1)}};return(0,s.jsxs)("div",{children:[(0,s.jsx)(r.Z,{className:"mx-auto mb-4 mt-4",onClick:()=>h(!0),children:"+ Add Pass-Through Endpoint"}),(0,s.jsx)(y.Z,{title:(0,s.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,s.jsx)(w.Z,{className:"text-xl text-blue-500"}),(0,s.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Pass-Through Endpoint"})]}),open:u,width:1e3,onCancel:D,footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,s.jsxs)("div",{className:"mt-6",children:[(0,s.jsx)(b.Z,{message:"What is a Pass-Through Endpoint?",description:"Route requests from your LiteLLM proxy to any external API. Perfect for custom models, image generation APIs, or any service you want to proxy through LiteLLM.",type:"info",showIcon:!0,className:"mb-6"}),(0,s.jsxs)(_.Z,{form:m,onFinish:z,layout:"vertical",className:"space-y-6",initialValues:{include_subpath:!0,path:S,target:I},children:[(0,s.jsxs)(f.Z,{className:"p-5",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Route Configuration"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-5",children:"Configure how requests to your domain will be forwarded to the target API"}),(0,s.jsxs)("div",{className:"space-y-5",children:[(0,s.jsx)(_.Z.Item,{label:(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Path Prefix"}),name:"path",rules:[{required:!0,message:"Path is required",pattern:/^\//}],extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example: /bria, /adobe-photoshop, /elasticsearch"}),className:"mb-4",children:(0,s.jsx)("div",{className:"flex items-center",children:(0,s.jsx)(g.Z,{placeholder:"bria",value:S,onChange:e=>q(e.target.value),className:"flex-1"})})}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Target URL"}),name:"target",rules:[{required:!0,message:"Target URL is required"},{type:"url",message:"Please enter a valid URL"}],extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-1",children:"Example:https://engine.prod.bria-api.com"}),className:"mb-4",children:(0,s.jsx)(g.Z,{placeholder:"https://engine.prod.bria-api.com",value:I,onChange:e=>{P(e.target.value),m.setFieldsValue({target:e.target.value})}})}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Include Subpaths"}),(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-0.5",children:"Forward all subpaths to the target API (recommended for REST APIs)"})]}),(0,s.jsx)(_.Z.Item,{name:"include_subpath",valuePropName:"checked",className:"mb-0",children:(0,s.jsx)(x.Z,{checked:L,onChange:R})})]})]})]}),(0,s.jsx)(M,{pathValue:S,targetValue:I,includeSubpath:L}),(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Headers"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Add headers that will be sent with every request to the target API"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Authentication Headers",(0,s.jsx)(c.Z,{title:"Authentication and other headers to forward with requests",children:(0,s.jsx)(k.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"headers",rules:[{required:!0,message:"Please configure the headers"}],extra:(0,s.jsxs)("div",{className:"text-xs text-gray-500 mt-2",children:[(0,s.jsx)("div",{className:"font-medium mb-1",children:"Add authentication tokens and other required headers"}),(0,s.jsx)("div",{children:"Common examples: auth_token, Authorization, x-api-key"})]}),children:(0,s.jsx)(E,{})})]}),(0,s.jsx)(T,{premiumUser:i,authEnabled:O,onAuthChange:e=>{V(e),m.setFieldsValue({auth:e})}}),(0,s.jsxs)(f.Z,{className:"p-6",children:[(0,s.jsx)(n.Z,{className:"text-lg font-semibold text-gray-900 mb-2",children:"Billing"}),(0,s.jsx)(j.Z,{className:"text-gray-600 mb-6",children:"Optional cost tracking for this endpoint"}),(0,s.jsx)(_.Z.Item,{label:(0,s.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Cost Per Request (USD)",(0,s.jsx)(c.Z,{title:"Optional: Track costs for requests to this endpoint",children:(0,s.jsx)(k.Z,{className:"ml-2 text-gray-400 hover:text-gray-600"})})]}),name:"cost_per_request",extra:(0,s.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"The cost charged for each request through this endpoint"}),children:(0,s.jsx)(N.Z,{min:0,step:.001,precision:4,placeholder:"2.0000",size:"large"})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:[(0,s.jsx)(r.Z,{variant:"secondary",onClick:D,children:"Cancel"}),(0,s.jsx)(r.Z,{variant:"primary",loading:p,onClick:()=>{console.log("Submit button clicked"),m.submit()},children:p?"Creating...":"Add Pass-Through Endpoint"})]})]})]})})]})},V=t(30078),D=t(64482),q=t(20577),z=t(87769),B=t(42208);let K=e=>{let{value:l}=e,[t,r]=(0,a.useState)(!1),o=JSON.stringify(l,null,2);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("pre",{className:"font-mono text-xs bg-gray-50 p-2 rounded max-w-md overflow-auto",children:t?o:"••••••••"}),(0,s.jsx)("button",{onClick:()=>r(!t),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:t?(0,s.jsx)(z.Z,{className:"w-4 h-4 text-gray-500"}):(0,s.jsx)(B.Z,{className:"w-4 h-4 text-gray-500"})})]})};var U=e=>{let{endpointData:l,onClose:t,accessToken:r,isAdmin:o,premiumUser:i=!1,onEndpointUpdated:n}=e,[c,m]=(0,a.useState)(l),[u,h]=(0,a.useState)(!1),[p,x]=(0,a.useState)(!1),[g,f]=(0,a.useState)((null==l?void 0:l.auth)||!1),[j]=_.Z.useForm(),v=async e=>{try{if(!r||!(null==c?void 0:c.id))return;let l={};if(e.headers)try{l="string"==typeof e.headers?JSON.parse(e.headers):e.headers}catch(e){F.Z.fromBackend("Invalid JSON format for headers");return}let t={path:c.path,target:e.target,headers:l,include_subpath:e.include_subpath,cost_per_request:e.cost_per_request,auth:i?e.auth:void 0};await (0,d.updatePassThroughEndpoint)(r,c.id,t),m({...c,...t}),x(!1),n&&n()}catch(e){console.error("Error updating endpoint:",e),F.Z.fromBackend("Failed to update pass through endpoint")}},y=async()=>{try{if(!r||!(null==c?void 0:c.id))return;await (0,d.deletePassThroughEndpointsCall)(r,c.id),F.Z.success("Pass through endpoint deleted successfully"),t(),n&&n()}catch(e){console.error("Error deleting endpoint:",e),F.Z.fromBackend("Failed to delete pass through endpoint")}};return u?(0,s.jsx)("div",{className:"p-4",children:"Loading..."}):c?(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(C.ZP,{onClick:t,className:"mb-4",children:"← Back"}),(0,s.jsxs)(V.Dx,{children:["Pass Through Endpoint: ",c.path]}),(0,s.jsx)(V.xv,{className:"text-gray-500 font-mono",children:c.id})]})}),(0,s.jsxs)(V.v0,{children:[(0,s.jsxs)(V.td,{className:"mb-4",children:[(0,s.jsx)(V.OK,{children:"Overview"},"overview"),o?(0,s.jsx)(V.OK,{children:"Settings"},"settings"):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(V.nP,{children:[(0,s.jsxs)(V.x4,{children:[(0,s.jsxs)(V.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(V.Zb,{children:[(0,s.jsx)(V.xv,{children:"Path"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(V.Dx,{className:"font-mono",children:c.path})})]}),(0,s.jsxs)(V.Zb,{children:[(0,s.jsx)(V.xv,{children:"Target"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(V.Dx,{children:c.target})})]}),(0,s.jsxs)(V.Zb,{children:[(0,s.jsx)(V.xv,{children:"Configuration"}),(0,s.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,s.jsx)("div",{children:(0,s.jsx)(V.Ct,{color:c.include_subpath?"green":"gray",children:c.include_subpath?"Include Subpath":"Exact Path"})}),(0,s.jsx)("div",{children:(0,s.jsx)(V.Ct,{color:c.auth?"blue":"gray",children:c.auth?"Auth Required":"No Auth"})}),void 0!==c.cost_per_request&&(0,s.jsx)("div",{children:(0,s.jsxs)(V.xv,{children:["Cost per request: $",c.cost_per_request]})})]})]})]}),(0,s.jsx)("div",{className:"mt-6",children:(0,s.jsx)(M,{pathValue:c.path,targetValue:c.target,includeSubpath:c.include_subpath||!1})}),c.headers&&Object.keys(c.headers).length>0&&(0,s.jsxs)(V.Zb,{className:"mt-6",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center",children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Headers"}),(0,s.jsxs)(V.Ct,{color:"blue",children:[Object.keys(c.headers).length," headers configured"]})]}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(K,{value:c.headers})})]})]}),o&&(0,s.jsx)(V.x4,{children:(0,s.jsxs)(V.Zb,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(V.Dx,{children:"Pass Through Endpoint Settings"}),(0,s.jsx)("div",{className:"space-x-2",children:!p&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(V.zx,{onClick:()=>x(!0),children:"Edit Settings"}),(0,s.jsx)(V.zx,{onClick:y,variant:"secondary",color:"red",children:"Delete Endpoint"})]})})]}),p?(0,s.jsxs)(_.Z,{form:j,onFinish:v,initialValues:{target:c.target,headers:c.headers?JSON.stringify(c.headers,null,2):"",include_subpath:c.include_subpath||!1,cost_per_request:c.cost_per_request,auth:c.auth||!1},layout:"vertical",children:[(0,s.jsx)(_.Z.Item,{label:"Target URL",name:"target",rules:[{required:!0,message:"Please input a target URL"}],children:(0,s.jsx)(V.oi,{placeholder:"https://api.example.com"})}),(0,s.jsx)(_.Z.Item,{label:"Headers (JSON)",name:"headers",children:(0,s.jsx)(D.default.TextArea,{rows:5,placeholder:'{"Authorization": "Bearer your-token", "Content-Type": "application/json"}'})}),(0,s.jsx)(_.Z.Item,{label:"Include Subpath",name:"include_subpath",valuePropName:"checked",children:(0,s.jsx)(L.Z,{})}),(0,s.jsx)(_.Z.Item,{label:"Cost per Request",name:"cost_per_request",children:(0,s.jsx)(q.Z,{min:0,step:.01,precision:2,placeholder:"0.00",addonBefore:"$"})}),(0,s.jsx)(T,{premiumUser:i,authEnabled:g,onAuthChange:e=>{f(e),j.setFieldsValue({auth:e})}}),(0,s.jsxs)("div",{className:"flex justify-end gap-2 mt-6",children:[(0,s.jsx)(C.ZP,{onClick:()=>x(!1),children:"Cancel"}),(0,s.jsx)(V.zx,{children:"Save Changes"})]})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Path"}),(0,s.jsx)("div",{className:"font-mono",children:c.path})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Target URL"}),(0,s.jsx)("div",{children:c.target})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Include Subpath"}),(0,s.jsx)(V.Ct,{color:c.include_subpath?"green":"gray",children:c.include_subpath?"Yes":"No"})]}),void 0!==c.cost_per_request&&(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Cost per Request"}),(0,s.jsxs)("div",{children:["$",c.cost_per_request]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Authentication Required"}),(0,s.jsx)(V.Ct,{color:c.auth?"green":"gray",children:c.auth?"Yes":"No"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(V.xv,{className:"font-medium",children:"Headers"}),c.headers&&Object.keys(c.headers).length>0?(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)(K,{value:c.headers})}):(0,s.jsx)("div",{className:"text-gray-500",children:"No headers configured"})]})]})]})})]})]})]}):(0,s.jsx)("div",{className:"p-4",children:"Pass through endpoint not found"})},G=t(12322);let H=e=>{let{value:l}=e,[t,r]=(0,a.useState)(!1),o=JSON.stringify(l);return(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)("span",{className:"font-mono text-xs",children:t?o:"••••••••"}),(0,s.jsx)("button",{onClick:()=>r(!t),className:"p-1 hover:bg-gray-100 rounded",type:"button",children:t?(0,s.jsx)(z.Z,{className:"w-4 h-4 text-gray-500"}):(0,s.jsx)(B.Z,{className:"w-4 h-4 text-gray-500"})})]})};var W=e=>{let{accessToken:l,userRole:t,userID:x,modelData:g,premiumUser:f}=e,[j,v]=(0,a.useState)([]),[_,y]=(0,a.useState)(null),[b,N]=(0,a.useState)(!1),[w,k]=(0,a.useState)(null);(0,a.useEffect)(()=>{l&&t&&x&&(0,d.getPassThroughEndpointsCall)(l).then(e=>{v(e.endpoints)})},[l,t,x]);let Z=async e=>{k(e),N(!0)},C=async()=>{if(null!=w&&l){try{await (0,d.deletePassThroughEndpointsCall)(l,w);let e=j.filter(e=>e.id!==w);v(e),F.Z.success("Endpoint deleted successfully.")}catch(e){console.error("Error deleting the endpoint:",e),F.Z.fromBackend("Error deleting the endpoint: "+e)}N(!1),k(null)}},S=(e,l)=>{Z(e)},A=[{header:"ID",accessorKey:"id",cell:e=>(0,s.jsx)(c.Z,{title:e.row.original.id,children:(0,s.jsx)("div",{className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",onClick:()=>e.row.original.id&&y(e.row.original.id),children:e.row.original.id})})},{header:"Path",accessorKey:"path"},{header:"Target",accessorKey:"target",cell:e=>(0,s.jsx)(i.Z,{children:e.getValue()})},{header:()=>(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{children:"Authentication"}),(0,s.jsx)(c.Z,{title:"LiteLLM Virtual Key required to call endpoint",children:(0,s.jsx)(u.Z,{className:"w-4 h-4 text-gray-400 cursor-help"})})]}),accessorKey:"auth",cell:e=>(0,s.jsx)(m.Z,{color:e.getValue()?"green":"gray",children:e.getValue()?"Yes":"No"})},{header:"Headers",accessorKey:"headers",cell:e=>(0,s.jsx)(H,{value:e.getValue()||{}})},{header:"Actions",id:"actions",cell:e=>{let{row:l}=e;return(0,s.jsxs)("div",{className:"flex space-x-1",children:[(0,s.jsx)(o.Z,{icon:h.Z,size:"sm",onClick:()=>l.original.id&&y(l.original.id),title:"Edit"}),(0,s.jsx)(o.Z,{icon:p.Z,size:"sm",onClick:()=>S(l.original.id,l.index),title:"Delete"})]})}}];if(!l)return null;if(_){console.log("selectedEndpointId",_),console.log("generalSettings",j);let e=j.find(e=>e.id===_);return e?(0,s.jsx)(U,{endpointData:e,onClose:()=>y(null),accessToken:l,isAdmin:"Admin"===t||"admin"===t,premiumUser:f,onEndpointUpdated:()=>{l&&(0,d.getPassThroughEndpointsCall)(l).then(e=>{v(e.endpoints)})}}):(0,s.jsx)("div",{children:"Endpoint not found"})}return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(n.Z,{children:"Pass Through Endpoints"}),(0,s.jsx)(i.Z,{className:"text-tremor-content",children:"Configure and manage your pass-through endpoints"})]}),(0,s.jsx)(O,{accessToken:l,setPassThroughItems:v,passThroughItems:j,premiumUser:f}),(0,s.jsx)(G.w,{data:j,columns:A,renderSubComponent:()=>(0,s.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:!1,noDataMessage:"No pass-through endpoints configured"}),b&&(0,s.jsx)("div",{className:"fixed z-10 inset-0 overflow-y-auto",children:(0,s.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,s.jsx)("div",{className:"fixed inset-0 transition-opacity","aria-hidden":"true",children:(0,s.jsx)("div",{className:"absolute inset-0 bg-gray-500 opacity-75"})}),(0,s.jsx)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"​"}),(0,s.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,s.jsx)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4",children:(0,s.jsx)("div",{className:"sm:flex sm:items-start",children:(0,s.jsxs)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left",children:[(0,s.jsx)("h3",{className:"text-lg leading-6 font-medium text-gray-900",children:"Delete Pass-Through Endpoint"}),(0,s.jsx)("div",{className:"mt-2",children:(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Are you sure you want to delete this pass-through endpoint? This action cannot be undone."})})]})})}),(0,s.jsxs)("div",{className:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse",children:[(0,s.jsx)(r.Z,{onClick:C,color:"red",className:"ml-2",children:"Delete"}),(0,s.jsx)(r.Z,{onClick:()=>{N(!1),k(null)},children:"Cancel"})]})]})]})})]})}},39789:function(e,l,t){t.d(l,{Z:function(){return i}});var s=t(57437),a=t(2265),r=t(21487),o=t(84264),i=e=>{let{value:l,onValueChange:t,label:i="Select Time Range",className:n="",showTimeRange:d=!0}=e,[c,m]=(0,a.useState)(!1),u=(0,a.useRef)(null),h=(0,a.useCallback)(e=>{m(!0),setTimeout(()=>m(!1),1500),t(e),requestIdleCallback(()=>{if(e.from){let l;let s={...e},a=new Date(e.from);l=new Date(e.to?e.to:e.from),a.toDateString(),l.toDateString(),a.setHours(0,0,0,0),l.setHours(23,59,59,999),s.from=a,s.to=l,t(s)}},{timeout:100})},[t]),p=(0,a.useCallback)((e,l)=>{if(!e||!l)return"";let t=e=>e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});if(e.toDateString()!==l.toDateString())return"".concat(t(e)," - ").concat(t(l));{let t=e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),s=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),a=l.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});return"".concat(t,": ").concat(s," - ").concat(a)}},[]);return(0,s.jsxs)("div",{className:n,children:[i&&(0,s.jsx)(o.Z,{className:"mb-2",children:i}),(0,s.jsxs)("div",{className:"relative w-fit",children:[(0,s.jsx)("div",{ref:u,children:(0,s.jsx)(r.Z,{enableSelect:!0,value:l,onValueChange:h,placeholder:"Select date range",enableClear:!1,style:{zIndex:100}})}),c&&(0,s.jsx)("div",{className:"absolute top-1/2 animate-pulse",style:{left:"calc(100% + 8px)",transform:"translateY(-50%)",zIndex:110},children:(0,s.jsxs)("div",{className:"flex items-center gap-1 text-green-600 text-sm font-medium bg-white px-2 py-1 rounded-full border border-green-200 shadow-sm whitespace-nowrap",children:[(0,s.jsx)("div",{className:"w-3 h-3 bg-green-500 text-white rounded-full flex items-center justify-center text-xs",children:"✓"}),(0,s.jsx)("span",{className:"text-xs",children:"Selected"})]})})]}),d&&l.from&&l.to&&(0,s.jsx)(o.Z,{className:"mt-2 text-xs text-gray-500",children:p(l.from,l.to)})]})}},12322:function(e,l,t){t.d(l,{w:function(){return n}});var s=t(57437),a=t(2265),r=t(71594),o=t(24525),i=t(19130);function n(e){let{data:l=[],columns:t,getRowCanExpand:n,renderSubComponent:d,isLoading:c=!1,loadingMessage:m="\uD83D\uDE85 Loading logs...",noDataMessage:u="No logs found"}=e,h=(0,r.b7)({data:l,columns:t,getRowCanExpand:n,getRowId:(e,l)=>{var t;return null!==(t=null==e?void 0:e.request_id)&&void 0!==t?t:String(l)},getCoreRowModel:(0,o.sC)(),getExpandedRowModel:(0,o.rV)()});return(0,s.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,s.jsxs)(i.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,s.jsx)(i.ss,{children:h.getHeaderGroups().map(e=>(0,s.jsx)(i.SC,{children:e.headers.map(e=>(0,s.jsx)(i.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,r.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,s.jsx)(i.RM,{children:c?(0,s.jsx)(i.SC,{children:(0,s.jsx)(i.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:m})})})}):h.getRowModel().rows.length>0?h.getRowModel().rows.map(e=>(0,s.jsxs)(a.Fragment,{children:[(0,s.jsx)(i.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,s.jsx)(i.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,r.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,s.jsx)(i.SC,{children:(0,s.jsx)(i.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,s.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:d({row:e})})})})]},e.id)):(0,s.jsx)(i.SC,{children:(0,s.jsx)(i.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,s.jsx)("div",{className:"text-center text-gray-500",children:(0,s.jsx)("p",{children:u})})})})})]})})}}}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/2012-7d504e8114e3c4be.js b/ui/litellm-dashboard/out/_next/static/chunks/2012-434800e13df9d31b.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/2012-7d504e8114e3c4be.js rename to ui/litellm-dashboard/out/_next/static/chunks/2012-434800e13df9d31b.js index f1b1015001b..491f98aee41 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/2012-7d504e8114e3c4be.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/2012-434800e13df9d31b.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2012],{26210:function(e,t,i){i.d(t,{UQ:function(){return s.Z},X1:function(){return l.Z},_m:function(){return a.Z},oi:function(){return n.Z},xv:function(){return r.Z}});var s=i(87452),l=i(88829),a=i(72208),r=i(84264),n=i(49566)},30078:function(e,t,i){i.d(t,{Ct:function(){return s.Z},Dx:function(){return h.Z},OK:function(){return n.Z},Zb:function(){return a.Z},nP:function(){return c.Z},oi:function(){return x.Z},rj:function(){return r.Z},td:function(){return d.Z},v0:function(){return m.Z},x4:function(){return o.Z},xv:function(){return u.Z},zx:function(){return l.Z}});var s=i(41649),l=i(20831),a=i(12514),r=i(67101),n=i(12485),m=i(18135),d=i(35242),o=i(29706),c=i(77991),u=i(84264),x=i(49566),h=i(96761)},62490:function(e,t,i){i.d(t,{Ct:function(){return s.Z},RM:function(){return n.Z},SC:function(){return c.Z},Zb:function(){return a.Z},iA:function(){return r.Z},pj:function(){return m.Z},ss:function(){return d.Z},xs:function(){return o.Z},xv:function(){return u.Z},zx:function(){return l.Z}});var s=i(41649),l=i(20831),a=i(12514),r=i(21626),n=i(97214),m=i(28241),d=i(58834),o=i(69552),c=i(71876),u=i(84264)},11318:function(e,t,i){i.d(t,{Z:function(){return n}});var s=i(2265),l=i(39760),a=i(19250);let r=async(e,t,i,s)=>"Admin"!=i&&"Admin Viewer"!=i?await (0,a.teamListCall)(e,(null==s?void 0:s.organization_id)||null,t):await (0,a.teamListCall)(e,(null==s?void 0:s.organization_id)||null);var n=()=>{let[e,t]=(0,s.useState)([]),{accessToken:i,userId:a,userRole:n}=(0,l.Z)();return(0,s.useEffect)(()=>{(async()=>{t(await r(i,a,n,null))})()},[i,a,n]),{teams:e,setTeams:t}}},33293:function(e,t,i){i.d(t,{Z:function(){return Y}});var s=i(57437),l=i(2265),a=i(24199),r=i(30078),n=i(20831),m=i(12514),d=i(47323),o=i(21626),c=i(97214),u=i(28241),x=i(58834),h=i(69552),_=i(71876),g=i(84264),p=i(15424),b=i(89970),v=i(53410),j=i(74998),f=i(59872),Z=e=>{let{teamData:t,canEditTeam:i,handleMemberDelete:l,setSelectedEditMember:a,setIsEditMemberModalVisible:r,setIsAddMemberModalVisible:Z}=e,y=e=>{if(null==e)return"0";if("number"==typeof e){let t=Number(e);return t===Math.floor(t)?t.toString():(0,f.pw)(t,8).replace(/\.?0+$/,"")}return"0"},N=e=>{if(!e)return 0;let i=t.team_memberships.find(t=>t.user_id===e);return(null==i?void 0:i.spend)||0},k=e=>{var i;if(!e)return null;let s=t.team_memberships.find(t=>t.user_id===e);console.log("membership=".concat(s));let l=null==s?void 0:null===(i=s.litellm_budget_table)||void 0===i?void 0:i.max_budget;return null==l?null:y(l)},w=e=>{var i,s;if(!e)return"No Limits";let l=t.team_memberships.find(t=>t.user_id===e),a=null==l?void 0:null===(i=l.litellm_budget_table)||void 0===i?void 0:i.rpm_limit,r=null==l?void 0:null===(s=l.litellm_budget_table)||void 0===s?void 0:s.tpm_limit,n=[a?"".concat(y(a)," RPM"):null,r?"".concat(y(r)," TPM"):null].filter(Boolean);return n.length>0?n.join(" / "):"No Limits"};return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(m.Z,{className:"w-full mx-auto flex-auto overflow-auto max-h-[50vh]",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(o.Z,{className:"min-w-full",children:[(0,s.jsx)(x.Z,{children:(0,s.jsxs)(_.Z,{children:[(0,s.jsx)(h.Z,{children:"User ID"}),(0,s.jsx)(h.Z,{children:"User Email"}),(0,s.jsx)(h.Z,{children:"Role"}),(0,s.jsxs)(h.Z,{children:["Team Member Spend (USD)"," ",(0,s.jsx)(b.Z,{title:"This is the amount spent by a user in the team.",children:(0,s.jsx)(p.Z,{})})]}),(0,s.jsx)(h.Z,{children:"Team Member Budget (USD)"}),(0,s.jsxs)(h.Z,{children:["Team Member Rate Limits"," ",(0,s.jsx)(b.Z,{title:"Rate limits for this member's usage within this team.",children:(0,s.jsx)(p.Z,{})})]}),(0,s.jsx)(h.Z,{className:"sticky right-0 bg-white z-10 border-l border-gray-200",children:"Actions"})]})}),(0,s.jsx)(c.Z,{children:t.team_info.members_with_roles.map((e,n)=>(0,s.jsxs)(_.Z,{children:[(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:e.user_id})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:e.user_email?e.user_email:"No Email"})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:e.role})}),(0,s.jsx)(u.Z,{children:(0,s.jsxs)(g.Z,{className:"font-mono",children:["$",(0,f.pw)(N(e.user_id),4)]})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:k(e.user_id)?"$".concat((0,f.pw)(Number(k(e.user_id)),4)):"No Limit"})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:w(e.user_id)})}),(0,s.jsx)(u.Z,{className:"sticky right-0 bg-white z-10 border-l border-gray-200",children:i&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Z,{icon:v.Z,size:"sm",onClick:()=>{var i,s,l;let n=t.team_memberships.find(t=>t.user_id===e.user_id);a({...e,max_budget_in_team:(null==n?void 0:null===(i=n.litellm_budget_table)||void 0===i?void 0:i.max_budget)||null,tpm_limit:(null==n?void 0:null===(s=n.litellm_budget_table)||void 0===s?void 0:s.tpm_limit)||null,rpm_limit:(null==n?void 0:null===(l=n.litellm_budget_table)||void 0===l?void 0:l.rpm_limit)||null}),r(!0)},className:"cursor-pointer hover:text-blue-600"}),(0,s.jsx)(d.Z,{icon:j.Z,size:"sm",onClick:()=>l(e),className:"cursor-pointer hover:text-red-600"})]})})]},n))})]})})}),(0,s.jsx)(n.Z,{onClick:()=>Z(!0),children:"Add Member"})]})},y=i(96761),N=i(73002),k=i(61994),w=i(85180),M=i(89245),T=i(78355),S=i(19250);let C={"/key/generate":"Member can generate a virtual key for this team","/key/service-account/generate":"Member can generate a service account key (not belonging to any user) for this team","/key/update":"Member can update a virtual key belonging to this team","/key/delete":"Member can delete a virtual key belonging to this team","/key/info":"Member can get info about a virtual key belonging to this team","/key/regenerate":"Member can regenerate a virtual key belonging to this team","/key/{key_id}/regenerate":"Member can regenerate a virtual key belonging to this team","/key/list":"Member can list virtual keys belonging to this team","/key/block":"Member can block a virtual key belonging to this team","/key/unblock":"Member can unblock a virtual key belonging to this team"},P=e=>e.includes("/info")||e.includes("/list")?"GET":"POST",L=e=>{let t=P(e),i=C[e];if(!i){for(let[t,s]of Object.entries(C))if(e.includes(t)){i=s;break}}return i||(i="Access ".concat(e)),{method:t,endpoint:e,description:i,route:e}};var I=i(9114),E=e=>{let{teamId:t,accessToken:i,canEditTeam:a}=e,[r,d]=(0,l.useState)([]),[p,b]=(0,l.useState)([]),[v,j]=(0,l.useState)(!0),[f,Z]=(0,l.useState)(!1),[C,P]=(0,l.useState)(!1),E=async()=>{try{if(j(!0),!i)return;let e=await (0,S.getTeamPermissionsCall)(i,t),s=e.all_available_permissions||[];d(s);let l=e.team_member_permissions||[];b(l),P(!1)}catch(e){I.Z.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{j(!1)}};(0,l.useEffect)(()=>{E()},[t,i]);let z=(e,t)=>{b(t?[...p,e]:p.filter(t=>t!==e)),P(!0)},A=async()=>{try{if(!i)return;Z(!0),await (0,S.teamPermissionsUpdateCall)(i,t,p),I.Z.success("Permissions updated successfully"),P(!1)}catch(e){I.Z.fromBackend("Failed to update permissions"),console.error("Error updating permissions:",e)}finally{Z(!1)}};if(v)return(0,s.jsx)("div",{className:"p-6 text-center",children:"Loading permissions..."});let D=r.length>0;return(0,s.jsxs)(m.Z,{className:"bg-white shadow-md rounded-md p-6",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b pb-4 mb-6",children:[(0,s.jsx)(y.Z,{className:"mb-2 sm:mb-0",children:"Member Permissions"}),a&&C&&(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsx)(N.ZP,{icon:(0,s.jsx)(M.Z,{}),onClick:()=>{E()},children:"Reset"}),(0,s.jsxs)(n.Z,{onClick:A,loading:f,className:"flex items-center gap-2",children:[(0,s.jsx)(T.Z,{})," Save Changes"]})]})]}),(0,s.jsx)(g.Z,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),D?(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(o.Z,{className:" min-w-full",children:[(0,s.jsx)(x.Z,{children:(0,s.jsxs)(_.Z,{children:[(0,s.jsx)(h.Z,{children:"Method"}),(0,s.jsx)(h.Z,{children:"Endpoint"}),(0,s.jsx)(h.Z,{children:"Description"}),(0,s.jsx)(h.Z,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:"Allow Access"})]})}),(0,s.jsx)(c.Z,{children:r.map(e=>{let t=L(e);return(0,s.jsxs)(_.Z,{className:"hover:bg-gray-50 transition-colors",children:[(0,s.jsx)(u.Z,{children:(0,s.jsx)("span",{className:"px-2 py-1 rounded text-xs font-medium ".concat("GET"===t.method?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"),children:t.method})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)("span",{className:"font-mono text-sm text-gray-800",children:t.endpoint})}),(0,s.jsx)(u.Z,{className:"text-gray-700",children:t.description}),(0,s.jsx)(u.Z,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,s.jsx)(k.Z,{checked:p.includes(e),onChange:t=>z(e,t.target.checked),disabled:!a})})]},e)})})]})}):(0,s.jsx)("div",{className:"py-12",children:(0,s.jsx)(w.Z,{description:"No permissions available"})})]})},z=i(13634),A=i(42264),D=i(64482),F=i(52787),B=i(10900),R=i(10901),U=i(33860),O=i(46468),V=i(98015),q=i(97415),K=i(95920),G=i(68473),$=i(21425),J=i(27799),Q=i(30401),W=i(78867),X=i(95096),H=i(33304),Y=e=>{var t,i,n,m,d,o,c,u,x,h,_,g,v,j,y,k;let{teamId:w,onClose:M,accessToken:T,is_team_admin:C,is_proxy_admin:P,userModels:L,editTeam:Y,premiumUser:ee=!1,onUpdate:et}=e,[ei,es]=(0,l.useState)(null),[el,ea]=(0,l.useState)(!0),[er,en]=(0,l.useState)(!1),[em]=z.Z.useForm(),[ed,eo]=(0,l.useState)(!1),[ec,eu]=(0,l.useState)(null),[ex,eh]=(0,l.useState)(!1),[e_,eg]=(0,l.useState)([]),[ep,eb]=(0,l.useState)(!1),[ev,ej]=(0,l.useState)({}),[ef,eZ]=(0,l.useState)([]);console.log("userModels in team info",L);let ey=C||P,eN=async()=>{try{if(ea(!0),!T)return;let e=await (0,S.teamInfoCall)(T,w);es(e)}catch(e){I.Z.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{ea(!1)}};(0,l.useEffect)(()=>{eN()},[w,T]),(0,l.useEffect)(()=>{(async()=>{try{if(!T)return;let e=(await (0,S.getGuardrailsList)(T)).guardrails.map(e=>e.guardrail_name);eZ(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[T]);let ek=async e=>{try{if(null==T)return;let t={user_email:e.user_email,user_id:e.user_id,role:e.role};await (0,S.teamMemberAddCall)(T,w,t),I.Z.success("Team member added successfully"),en(!1),em.resetFields();let i=await (0,S.teamInfoCall)(T,w);es(i),et(i)}catch(l){var t,i,s;let e="Failed to add team member";(null==l?void 0:null===(s=l.raw)||void 0===s?void 0:null===(i=s.detail)||void 0===i?void 0:null===(t=i.error)||void 0===t?void 0:t.includes("Assigning team admins is a premium feature"))?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":(null==l?void 0:l.message)&&(e=l.message),I.Z.fromBackend(e),console.error("Error adding team member:",l)}},ew=async e=>{try{if(null==T)return;let t={user_email:e.user_email,user_id:e.user_id,role:e.role,max_budget_in_team:e.max_budget_in_team,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit};console.log("Updating member with values:",t),A.ZP.destroy(),await (0,S.teamMemberUpdateCall)(T,w,t),I.Z.success("Team member updated successfully"),eo(!1);let i=await (0,S.teamInfoCall)(T,w);es(i),et(i)}catch(s){var t,i;let e="Failed to update team member";(null==s?void 0:null===(i=s.raw)||void 0===i?void 0:null===(t=i.detail)||void 0===t?void 0:t.includes("Assigning team admins is a premium feature"))?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":(null==s?void 0:s.message)&&(e=s.message),eo(!1),A.ZP.destroy(),I.Z.fromBackend(e),console.error("Error updating team member:",s)}},eM=async e=>{try{if(null==T)return;await (0,S.teamMemberDeleteCall)(T,w,e),I.Z.success("Team member removed successfully");let t=await (0,S.teamInfoCall)(T,w);es(t),et(t)}catch(e){I.Z.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}},eT=async e=>{try{if(!T)return;let t={};try{t=e.metadata?JSON.parse(e.metadata):{}}catch(e){I.Z.fromBackend("Invalid JSON in metadata field");return}let i=e=>null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&Number.isNaN(e)?null:e,s={team_id:w,team_alias:e.team_alias,models:e.models,tpm_limit:i(e.tpm_limit),rpm_limit:i(e.rpm_limit),max_budget:e.max_budget,budget_duration:e.budget_duration,metadata:{...t,guardrails:e.guardrails||[],logging:e.logging_settings||[]},organization_id:e.organization_id};s.max_budget=(0,H.C)(s.max_budget),void 0!==e.team_member_budget&&(s.team_member_budget=Number(e.team_member_budget)),void 0!==e.team_member_key_duration&&(s.team_member_key_duration=e.team_member_key_duration),(void 0!==e.team_member_tpm_limit||void 0!==e.team_member_rpm_limit)&&(s.team_member_tpm_limit=i(e.team_member_tpm_limit),s.team_member_rpm_limit=i(e.team_member_rpm_limit));let{servers:l,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]},r=e.mcp_tool_permissions||{};(l&&l.length>0||a&&a.length>0||Object.keys(r).length>0)&&(s.object_permission={},l&&l.length>0&&(s.object_permission.mcp_servers=l),a&&a.length>0&&(s.object_permission.mcp_access_groups=a),Object.keys(r).length>0&&(s.object_permission.mcp_tool_permissions=r)),delete e.mcp_servers_and_groups,delete e.mcp_tool_permissions,await (0,S.teamUpdateCall)(T,s),I.Z.success("Team settings updated successfully"),eh(!1),eN()}catch(e){console.error("Error updating team:",e)}};if(el)return(0,s.jsx)("div",{className:"p-4",children:"Loading..."});if(!(null==ei?void 0:ei.team_info))return(0,s.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:eS}=ei,eC=async(e,t)=>{await (0,f.vQ)(e)&&(ej(e=>({...e,[t]:!0})),setTimeout(()=>{ej(e=>({...e,[t]:!1}))},2e3))};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(r.zx,{icon:B.Z,variant:"light",onClick:M,className:"mb-4",children:"Back to Teams"}),(0,s.jsx)(r.Dx,{children:eS.team_alias}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(r.xv,{className:"text-gray-500 font-mono",children:eS.team_id}),(0,s.jsx)(N.ZP,{type:"text",size:"small",icon:ev["team-id"]?(0,s.jsx)(Q.Z,{size:12}):(0,s.jsx)(W.Z,{size:12}),onClick:()=>eC(eS.team_id,"team-id"),className:"left-2 z-10 transition-all duration-200 ".concat(ev["team-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]})}),(0,s.jsxs)(r.v0,{defaultIndex:Y?3:0,children:[(0,s.jsx)(r.td,{className:"mb-4",children:[(0,s.jsx)(r.OK,{children:"Overview"},"overview"),...ey?[(0,s.jsx)(r.OK,{children:"Members"},"members"),(0,s.jsx)(r.OK,{children:"Member Permissions"},"member-permissions"),(0,s.jsx)(r.OK,{children:"Settings"},"settings")]:[]]}),(0,s.jsxs)(r.nP,{children:[(0,s.jsx)(r.x4,{children:(0,s.jsxs)(r.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(r.Zb,{children:[(0,s.jsx)(r.xv,{children:"Budget Status"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(r.Dx,{children:["$",(0,f.pw)(eS.spend,4)]}),(0,s.jsxs)(r.xv,{children:["of ",null===eS.max_budget?"Unlimited":"$".concat((0,f.pw)(eS.max_budget,4))]}),eS.budget_duration&&(0,s.jsxs)(r.xv,{className:"text-gray-500",children:["Reset: ",eS.budget_duration]}),(0,s.jsx)("br",{}),eS.team_member_budget_table&&(0,s.jsxs)(r.xv,{className:"text-gray-500",children:["Team Member Budget: $",(0,f.pw)(eS.team_member_budget_table.max_budget,4)]})]})]}),(0,s.jsxs)(r.Zb,{children:[(0,s.jsx)(r.xv,{children:"Rate Limits"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(r.xv,{children:["TPM: ",eS.tpm_limit||"Unlimited"]}),(0,s.jsxs)(r.xv,{children:["RPM: ",eS.rpm_limit||"Unlimited"]}),eS.max_parallel_requests&&(0,s.jsxs)(r.xv,{children:["Max Parallel Requests: ",eS.max_parallel_requests]})]})]}),(0,s.jsxs)(r.Zb,{children:[(0,s.jsx)(r.xv,{children:"Models"}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===eS.models.length?(0,s.jsx)(r.Ct,{color:"red",children:"All proxy models"}):eS.models.map((e,t)=>(0,s.jsx)(r.Ct,{color:"red",children:e},t))})]}),(0,s.jsxs)(r.Zb,{children:[(0,s.jsx)(r.xv,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(r.xv,{children:["User Keys: ",ei.keys.filter(e=>e.user_id).length]}),(0,s.jsxs)(r.xv,{children:["Service Account Keys: ",ei.keys.filter(e=>!e.user_id).length]}),(0,s.jsxs)(r.xv,{className:"text-gray-500",children:["Total: ",ei.keys.length]})]})]}),(0,s.jsx)(V.Z,{objectPermission:eS.object_permission,variant:"card",accessToken:T}),(0,s.jsx)(J.Z,{loggingConfigs:(null===(t=eS.metadata)||void 0===t?void 0:t.logging)||[],disabledCallbacks:[],variant:"card"})]})}),(0,s.jsx)(r.x4,{children:(0,s.jsx)(Z,{teamData:ei,canEditTeam:ey,handleMemberDelete:eM,setSelectedEditMember:eu,setIsEditMemberModalVisible:eo,setIsAddMemberModalVisible:en})}),ey&&(0,s.jsx)(r.x4,{children:(0,s.jsx)(E,{teamId:w,accessToken:T,canEditTeam:ey})}),(0,s.jsx)(r.x4,{children:(0,s.jsxs)(r.Zb,{className:"overflow-y-auto max-h-[65vh]",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(r.Dx,{children:"Team Settings"}),ey&&!ex&&(0,s.jsx)(r.zx,{onClick:()=>eh(!0),children:"Edit Settings"})]}),ex?(0,s.jsxs)(z.Z,{form:em,onFinish:eT,initialValues:{...eS,team_alias:eS.team_alias,models:eS.models,tpm_limit:eS.tpm_limit,rpm_limit:eS.rpm_limit,max_budget:eS.max_budget,budget_duration:eS.budget_duration,team_member_tpm_limit:null===(i=eS.team_member_budget_table)||void 0===i?void 0:i.tpm_limit,team_member_rpm_limit:null===(n=eS.team_member_budget_table)||void 0===n?void 0:n.rpm_limit,guardrails:(null===(m=eS.metadata)||void 0===m?void 0:m.guardrails)||[],metadata:eS.metadata?JSON.stringify((e=>{let{logging:t,...i}=e;return i})(eS.metadata),null,2):"",logging_settings:(null===(d=eS.metadata)||void 0===d?void 0:d.logging)||[],organization_id:eS.organization_id,vector_stores:(null===(o=eS.object_permission)||void 0===o?void 0:o.vector_stores)||[],mcp_servers:(null===(c=eS.object_permission)||void 0===c?void 0:c.mcp_servers)||[],mcp_access_groups:(null===(u=eS.object_permission)||void 0===u?void 0:u.mcp_access_groups)||[],mcp_servers_and_groups:{servers:(null===(x=eS.object_permission)||void 0===x?void 0:x.mcp_servers)||[],accessGroups:(null===(h=eS.object_permission)||void 0===h?void 0:h.mcp_access_groups)||[]},mcp_tool_permissions:(null===(_=eS.object_permission)||void 0===_?void 0:_.mcp_tool_permissions)||{}},layout:"vertical",children:[(0,s.jsx)(z.Z.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,s.jsx)(D.default,{type:""})}),(0,s.jsx)(z.Z.Item,{label:"Models",name:"models",children:(0,s.jsxs)(F.default,{mode:"multiple",placeholder:"Select models",children:[(0,s.jsx)(F.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),Array.from(new Set(L)).map((e,t)=>(0,s.jsx)(F.default.Option,{value:e,children:(0,O.W0)(e)},t))]})}),(0,s.jsx)(z.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,s.jsx)(a.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,s.jsx)(z.Z.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",tooltip:"This is the individual budget for a user in the team.",children:(0,s.jsx)(a.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,s.jsx)(z.Z.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,s.jsx)(r.oi,{placeholder:"e.g., 30d"})}),(0,s.jsx)(z.Z.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"Default tokens per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,s.jsx)(a.Z,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,s.jsx)(z.Z.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"Default requests per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,s.jsx)(a.Z,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})}),(0,s.jsx)(z.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsxs)(F.default,{placeholder:"n/a",children:[(0,s.jsx)(F.default.Option,{value:"24h",children:"daily"}),(0,s.jsx)(F.default.Option,{value:"7d",children:"weekly"}),(0,s.jsx)(F.default.Option,{value:"30d",children:"monthly"})]})}),(0,s.jsx)(z.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,s.jsx)(a.Z,{step:1,style:{width:"100%"}})}),(0,s.jsx)(z.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,s.jsx)(a.Z,{step:1,style:{width:"100%"}})}),(0,s.jsx)(z.Z.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(b.Z,{title:"Setup your first guardrail",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,s.jsx)(F.default,{mode:"tags",placeholder:"Select or enter guardrails",options:ef.map(e=>({value:e,label:e}))})}),(0,s.jsx)(z.Z.Item,{label:"Vector Stores",name:"vector_stores",children:(0,s.jsx)(q.Z,{onChange:e=>em.setFieldValue("vector_stores",e),value:em.getFieldValue("vector_stores"),accessToken:T||"",placeholder:"Select vector stores"})}),(0,s.jsx)(z.Z.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,s.jsx)(X.Z,{onChange:e=>em.setFieldValue("allowed_passthrough_routes",e),value:em.getFieldValue("allowed_passthrough_routes"),accessToken:T||"",placeholder:"Select pass through routes"})}),(0,s.jsx)(z.Z.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,s.jsx)(K.Z,{onChange:e=>em.setFieldValue("mcp_servers_and_groups",e),value:em.getFieldValue("mcp_servers_and_groups"),accessToken:T||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,s.jsx)(z.Z.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,s.jsx)(D.default,{type:"hidden"})}),(0,s.jsx)(z.Z.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>{var e;return(0,s.jsx)("div",{className:"mb-6",children:(0,s.jsx)(G.Z,{accessToken:T||"",selectedServers:(null===(e=em.getFieldValue("mcp_servers_and_groups"))||void 0===e?void 0:e.servers)||[],toolPermissions:em.getFieldValue("mcp_tool_permissions")||{},onChange:e=>em.setFieldsValue({mcp_tool_permissions:e})})})}}),(0,s.jsx)(z.Z.Item,{label:"Organization ID",name:"organization_id",children:(0,s.jsx)(D.default,{type:""})}),(0,s.jsx)(z.Z.Item,{label:"Logging Settings",name:"logging_settings",children:(0,s.jsx)($.Z,{value:em.getFieldValue("logging_settings"),onChange:e=>em.setFieldValue("logging_settings",e)})}),(0,s.jsx)(z.Z.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(D.default.TextArea,{rows:10})}),(0,s.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,s.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,s.jsx)(N.ZP,{htmlType:"button",onClick:()=>eh(!1),children:"Cancel"}),(0,s.jsx)(r.zx,{type:"submit",children:"Save Changes"})]})})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Team Name"}),(0,s.jsx)("div",{children:eS.team_alias})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Team ID"}),(0,s.jsx)("div",{className:"font-mono",children:eS.team_id})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Created At"}),(0,s.jsx)("div",{children:new Date(eS.created_at).toLocaleString()})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Models"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eS.models.map((e,t)=>(0,s.jsx)(r.Ct,{color:"red",children:e},t))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Rate Limits"}),(0,s.jsxs)("div",{children:["TPM: ",eS.tpm_limit||"Unlimited"]}),(0,s.jsxs)("div",{children:["RPM: ",eS.rpm_limit||"Unlimited"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Team Budget"}),(0,s.jsxs)("div",{children:["Max Budget:"," ",null!==eS.max_budget?"$".concat((0,f.pw)(eS.max_budget,4)):"No Limit"]}),(0,s.jsxs)("div",{children:["Budget Reset: ",eS.budget_duration||"Never"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(r.xv,{className:"font-medium",children:["Team Member Settings"," ",(0,s.jsx)(b.Z,{title:"These are limits on individual team members",children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})]}),(0,s.jsxs)("div",{children:["Max Budget: ",(null===(g=eS.team_member_budget_table)||void 0===g?void 0:g.max_budget)||"No Limit"]}),(0,s.jsxs)("div",{children:["Key Duration: ",(null===(v=eS.metadata)||void 0===v?void 0:v.team_member_key_duration)||"No Limit"]}),(0,s.jsxs)("div",{children:["TPM Limit: ",(null===(j=eS.team_member_budget_table)||void 0===j?void 0:j.tpm_limit)||"No Limit"]}),(0,s.jsxs)("div",{children:["RPM Limit: ",(null===(y=eS.team_member_budget_table)||void 0===y?void 0:y.rpm_limit)||"No Limit"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Organization ID"}),(0,s.jsx)("div",{children:eS.organization_id})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Status"}),(0,s.jsx)(r.Ct,{color:eS.blocked?"red":"green",children:eS.blocked?"Blocked":"Active"})]}),(0,s.jsx)(V.Z,{objectPermission:eS.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:T}),(0,s.jsx)(J.Z,{loggingConfigs:(null===(k=eS.metadata)||void 0===k?void 0:k.logging)||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]}),(0,s.jsx)(R.Z,{visible:ed,onCancel:()=>eo(!1),onSubmit:ew,initialData:ec,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Admin",value:"admin"},{label:"User",value:"user"}],additionalFields:[{name:"max_budget_in_team",label:(0,s.jsxs)("span",{children:["Team Member Budget (USD)"," ",(0,s.jsx)(b.Z,{title:"Maximum amount in USD this member can spend within this team. This is separate from any global user budget limits",children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:.01,min:0,placeholder:"Budget limit for this member within this team"},{name:"tpm_limit",label:(0,s.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,s.jsx)(b.Z,{title:"Maximum tokens per minute this member can use within this team. This is separate from any global user TPM limit",children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Tokens per minute limit for this member in this team"},{name:"rpm_limit",label:(0,s.jsxs)("span",{children:["Team Member RPM Limit"," ",(0,s.jsx)(b.Z,{title:"Maximum requests per minute this member can make within this team. This is separate from any global user RPM limit",children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Requests per minute limit for this member in this team"}]}}),(0,s.jsx)(U.Z,{isVisible:er,onCancel:()=>en(!1),onSubmit:ek,accessToken:T})]})}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2012],{26210:function(e,t,i){i.d(t,{UQ:function(){return s.Z},X1:function(){return l.Z},_m:function(){return a.Z},oi:function(){return n.Z},xv:function(){return r.Z}});var s=i(87452),l=i(88829),a=i(72208),r=i(84264),n=i(49566)},30078:function(e,t,i){i.d(t,{Ct:function(){return s.Z},Dx:function(){return h.Z},OK:function(){return n.Z},Zb:function(){return a.Z},nP:function(){return c.Z},oi:function(){return x.Z},rj:function(){return r.Z},td:function(){return d.Z},v0:function(){return m.Z},x4:function(){return o.Z},xv:function(){return u.Z},zx:function(){return l.Z}});var s=i(41649),l=i(20831),a=i(12514),r=i(67101),n=i(12485),m=i(18135),d=i(35242),o=i(29706),c=i(77991),u=i(84264),x=i(49566),h=i(96761)},62490:function(e,t,i){i.d(t,{Ct:function(){return s.Z},RM:function(){return n.Z},SC:function(){return c.Z},Zb:function(){return a.Z},iA:function(){return r.Z},pj:function(){return m.Z},ss:function(){return d.Z},xs:function(){return o.Z},xv:function(){return u.Z},zx:function(){return l.Z}});var s=i(41649),l=i(20831),a=i(12514),r=i(21626),n=i(97214),m=i(28241),d=i(58834),o=i(69552),c=i(71876),u=i(84264)},11318:function(e,t,i){i.d(t,{Z:function(){return n}});var s=i(2265),l=i(80443),a=i(19250);let r=async(e,t,i,s)=>"Admin"!=i&&"Admin Viewer"!=i?await (0,a.teamListCall)(e,(null==s?void 0:s.organization_id)||null,t):await (0,a.teamListCall)(e,(null==s?void 0:s.organization_id)||null);var n=()=>{let[e,t]=(0,s.useState)([]),{accessToken:i,userId:a,userRole:n}=(0,l.Z)();return(0,s.useEffect)(()=>{(async()=>{t(await r(i,a,n,null))})()},[i,a,n]),{teams:e,setTeams:t}}},33293:function(e,t,i){i.d(t,{Z:function(){return Y}});var s=i(57437),l=i(2265),a=i(24199),r=i(30078),n=i(20831),m=i(12514),d=i(47323),o=i(21626),c=i(97214),u=i(28241),x=i(58834),h=i(69552),_=i(71876),g=i(84264),p=i(15424),b=i(89970),v=i(53410),j=i(74998),f=i(59872),Z=e=>{let{teamData:t,canEditTeam:i,handleMemberDelete:l,setSelectedEditMember:a,setIsEditMemberModalVisible:r,setIsAddMemberModalVisible:Z}=e,y=e=>{if(null==e)return"0";if("number"==typeof e){let t=Number(e);return t===Math.floor(t)?t.toString():(0,f.pw)(t,8).replace(/\.?0+$/,"")}return"0"},N=e=>{if(!e)return 0;let i=t.team_memberships.find(t=>t.user_id===e);return(null==i?void 0:i.spend)||0},k=e=>{var i;if(!e)return null;let s=t.team_memberships.find(t=>t.user_id===e);console.log("membership=".concat(s));let l=null==s?void 0:null===(i=s.litellm_budget_table)||void 0===i?void 0:i.max_budget;return null==l?null:y(l)},w=e=>{var i,s;if(!e)return"No Limits";let l=t.team_memberships.find(t=>t.user_id===e),a=null==l?void 0:null===(i=l.litellm_budget_table)||void 0===i?void 0:i.rpm_limit,r=null==l?void 0:null===(s=l.litellm_budget_table)||void 0===s?void 0:s.tpm_limit,n=[a?"".concat(y(a)," RPM"):null,r?"".concat(y(r)," TPM"):null].filter(Boolean);return n.length>0?n.join(" / "):"No Limits"};return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(m.Z,{className:"w-full mx-auto flex-auto overflow-auto max-h-[50vh]",children:(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(o.Z,{className:"min-w-full",children:[(0,s.jsx)(x.Z,{children:(0,s.jsxs)(_.Z,{children:[(0,s.jsx)(h.Z,{children:"User ID"}),(0,s.jsx)(h.Z,{children:"User Email"}),(0,s.jsx)(h.Z,{children:"Role"}),(0,s.jsxs)(h.Z,{children:["Team Member Spend (USD)"," ",(0,s.jsx)(b.Z,{title:"This is the amount spent by a user in the team.",children:(0,s.jsx)(p.Z,{})})]}),(0,s.jsx)(h.Z,{children:"Team Member Budget (USD)"}),(0,s.jsxs)(h.Z,{children:["Team Member Rate Limits"," ",(0,s.jsx)(b.Z,{title:"Rate limits for this member's usage within this team.",children:(0,s.jsx)(p.Z,{})})]}),(0,s.jsx)(h.Z,{className:"sticky right-0 bg-white z-10 border-l border-gray-200",children:"Actions"})]})}),(0,s.jsx)(c.Z,{children:t.team_info.members_with_roles.map((e,n)=>(0,s.jsxs)(_.Z,{children:[(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:e.user_id})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:e.user_email?e.user_email:"No Email"})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:e.role})}),(0,s.jsx)(u.Z,{children:(0,s.jsxs)(g.Z,{className:"font-mono",children:["$",(0,f.pw)(N(e.user_id),4)]})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:k(e.user_id)?"$".concat((0,f.pw)(Number(k(e.user_id)),4)):"No Limit"})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)(g.Z,{className:"font-mono",children:w(e.user_id)})}),(0,s.jsx)(u.Z,{className:"sticky right-0 bg-white z-10 border-l border-gray-200",children:i&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Z,{icon:v.Z,size:"sm",onClick:()=>{var i,s,l;let n=t.team_memberships.find(t=>t.user_id===e.user_id);a({...e,max_budget_in_team:(null==n?void 0:null===(i=n.litellm_budget_table)||void 0===i?void 0:i.max_budget)||null,tpm_limit:(null==n?void 0:null===(s=n.litellm_budget_table)||void 0===s?void 0:s.tpm_limit)||null,rpm_limit:(null==n?void 0:null===(l=n.litellm_budget_table)||void 0===l?void 0:l.rpm_limit)||null}),r(!0)},className:"cursor-pointer hover:text-blue-600"}),(0,s.jsx)(d.Z,{icon:j.Z,size:"sm",onClick:()=>l(e),className:"cursor-pointer hover:text-red-600"})]})})]},n))})]})})}),(0,s.jsx)(n.Z,{onClick:()=>Z(!0),children:"Add Member"})]})},y=i(96761),N=i(73002),k=i(61994),w=i(85180),M=i(89245),T=i(78355),S=i(19250);let C={"/key/generate":"Member can generate a virtual key for this team","/key/service-account/generate":"Member can generate a service account key (not belonging to any user) for this team","/key/update":"Member can update a virtual key belonging to this team","/key/delete":"Member can delete a virtual key belonging to this team","/key/info":"Member can get info about a virtual key belonging to this team","/key/regenerate":"Member can regenerate a virtual key belonging to this team","/key/{key_id}/regenerate":"Member can regenerate a virtual key belonging to this team","/key/list":"Member can list virtual keys belonging to this team","/key/block":"Member can block a virtual key belonging to this team","/key/unblock":"Member can unblock a virtual key belonging to this team"},P=e=>e.includes("/info")||e.includes("/list")?"GET":"POST",L=e=>{let t=P(e),i=C[e];if(!i){for(let[t,s]of Object.entries(C))if(e.includes(t)){i=s;break}}return i||(i="Access ".concat(e)),{method:t,endpoint:e,description:i,route:e}};var I=i(9114),E=e=>{let{teamId:t,accessToken:i,canEditTeam:a}=e,[r,d]=(0,l.useState)([]),[p,b]=(0,l.useState)([]),[v,j]=(0,l.useState)(!0),[f,Z]=(0,l.useState)(!1),[C,P]=(0,l.useState)(!1),E=async()=>{try{if(j(!0),!i)return;let e=await (0,S.getTeamPermissionsCall)(i,t),s=e.all_available_permissions||[];d(s);let l=e.team_member_permissions||[];b(l),P(!1)}catch(e){I.Z.fromBackend("Failed to load permissions"),console.error("Error fetching permissions:",e)}finally{j(!1)}};(0,l.useEffect)(()=>{E()},[t,i]);let z=(e,t)=>{b(t?[...p,e]:p.filter(t=>t!==e)),P(!0)},A=async()=>{try{if(!i)return;Z(!0),await (0,S.teamPermissionsUpdateCall)(i,t,p),I.Z.success("Permissions updated successfully"),P(!1)}catch(e){I.Z.fromBackend("Failed to update permissions"),console.error("Error updating permissions:",e)}finally{Z(!1)}};if(v)return(0,s.jsx)("div",{className:"p-6 text-center",children:"Loading permissions..."});let D=r.length>0;return(0,s.jsxs)(m.Z,{className:"bg-white shadow-md rounded-md p-6",children:[(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row justify-between items-start sm:items-center border-b pb-4 mb-6",children:[(0,s.jsx)(y.Z,{className:"mb-2 sm:mb-0",children:"Member Permissions"}),a&&C&&(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsx)(N.ZP,{icon:(0,s.jsx)(M.Z,{}),onClick:()=>{E()},children:"Reset"}),(0,s.jsxs)(n.Z,{onClick:A,loading:f,className:"flex items-center gap-2",children:[(0,s.jsx)(T.Z,{})," Save Changes"]})]})]}),(0,s.jsx)(g.Z,{className:"mb-6 text-gray-600",children:"Control what team members can do when they are not team admins."}),D?(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)(o.Z,{className:" min-w-full",children:[(0,s.jsx)(x.Z,{children:(0,s.jsxs)(_.Z,{children:[(0,s.jsx)(h.Z,{children:"Method"}),(0,s.jsx)(h.Z,{children:"Endpoint"}),(0,s.jsx)(h.Z,{children:"Description"}),(0,s.jsx)(h.Z,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:"Allow Access"})]})}),(0,s.jsx)(c.Z,{children:r.map(e=>{let t=L(e);return(0,s.jsxs)(_.Z,{className:"hover:bg-gray-50 transition-colors",children:[(0,s.jsx)(u.Z,{children:(0,s.jsx)("span",{className:"px-2 py-1 rounded text-xs font-medium ".concat("GET"===t.method?"bg-blue-100 text-blue-800":"bg-green-100 text-green-800"),children:t.method})}),(0,s.jsx)(u.Z,{children:(0,s.jsx)("span",{className:"font-mono text-sm text-gray-800",children:t.endpoint})}),(0,s.jsx)(u.Z,{className:"text-gray-700",children:t.description}),(0,s.jsx)(u.Z,{className:"sticky right-0 bg-white shadow-[-4px_0_4px_-4px_rgba(0,0,0,0.1)] text-center",children:(0,s.jsx)(k.Z,{checked:p.includes(e),onChange:t=>z(e,t.target.checked),disabled:!a})})]},e)})})]})}):(0,s.jsx)("div",{className:"py-12",children:(0,s.jsx)(w.Z,{description:"No permissions available"})})]})},z=i(13634),A=i(42264),D=i(64482),F=i(52787),B=i(10900),R=i(10901),U=i(33860),O=i(46468),V=i(98015),q=i(97415),K=i(95920),G=i(68473),$=i(21425),J=i(27799),Q=i(30401),W=i(78867),X=i(95096),H=i(33304),Y=e=>{var t,i,n,m,d,o,c,u,x,h,_,g,v,j,y,k;let{teamId:w,onClose:M,accessToken:T,is_team_admin:C,is_proxy_admin:P,userModels:L,editTeam:Y,premiumUser:ee=!1,onUpdate:et}=e,[ei,es]=(0,l.useState)(null),[el,ea]=(0,l.useState)(!0),[er,en]=(0,l.useState)(!1),[em]=z.Z.useForm(),[ed,eo]=(0,l.useState)(!1),[ec,eu]=(0,l.useState)(null),[ex,eh]=(0,l.useState)(!1),[e_,eg]=(0,l.useState)([]),[ep,eb]=(0,l.useState)(!1),[ev,ej]=(0,l.useState)({}),[ef,eZ]=(0,l.useState)([]);console.log("userModels in team info",L);let ey=C||P,eN=async()=>{try{if(ea(!0),!T)return;let e=await (0,S.teamInfoCall)(T,w);es(e)}catch(e){I.Z.fromBackend("Failed to load team information"),console.error("Error fetching team info:",e)}finally{ea(!1)}};(0,l.useEffect)(()=>{eN()},[w,T]),(0,l.useEffect)(()=>{(async()=>{try{if(!T)return;let e=(await (0,S.getGuardrailsList)(T)).guardrails.map(e=>e.guardrail_name);eZ(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[T]);let ek=async e=>{try{if(null==T)return;let t={user_email:e.user_email,user_id:e.user_id,role:e.role};await (0,S.teamMemberAddCall)(T,w,t),I.Z.success("Team member added successfully"),en(!1),em.resetFields();let i=await (0,S.teamInfoCall)(T,w);es(i),et(i)}catch(l){var t,i,s;let e="Failed to add team member";(null==l?void 0:null===(s=l.raw)||void 0===s?void 0:null===(i=s.detail)||void 0===i?void 0:null===(t=i.error)||void 0===t?void 0:t.includes("Assigning team admins is a premium feature"))?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":(null==l?void 0:l.message)&&(e=l.message),I.Z.fromBackend(e),console.error("Error adding team member:",l)}},ew=async e=>{try{if(null==T)return;let t={user_email:e.user_email,user_id:e.user_id,role:e.role,max_budget_in_team:e.max_budget_in_team,tpm_limit:e.tpm_limit,rpm_limit:e.rpm_limit};console.log("Updating member with values:",t),A.ZP.destroy(),await (0,S.teamMemberUpdateCall)(T,w,t),I.Z.success("Team member updated successfully"),eo(!1);let i=await (0,S.teamInfoCall)(T,w);es(i),et(i)}catch(s){var t,i;let e="Failed to update team member";(null==s?void 0:null===(i=s.raw)||void 0===i?void 0:null===(t=i.detail)||void 0===t?void 0:t.includes("Assigning team admins is a premium feature"))?e="Assigning admins is an enterprise-only feature. Please upgrade your LiteLLM plan to enable this.":(null==s?void 0:s.message)&&(e=s.message),eo(!1),A.ZP.destroy(),I.Z.fromBackend(e),console.error("Error updating team member:",s)}},eM=async e=>{try{if(null==T)return;await (0,S.teamMemberDeleteCall)(T,w,e),I.Z.success("Team member removed successfully");let t=await (0,S.teamInfoCall)(T,w);es(t),et(t)}catch(e){I.Z.fromBackend("Failed to remove team member"),console.error("Error removing team member:",e)}},eT=async e=>{try{if(!T)return;let t={};try{t=e.metadata?JSON.parse(e.metadata):{}}catch(e){I.Z.fromBackend("Invalid JSON in metadata field");return}let i=e=>null==e||"string"==typeof e&&""===e.trim()||"number"==typeof e&&Number.isNaN(e)?null:e,s={team_id:w,team_alias:e.team_alias,models:e.models,tpm_limit:i(e.tpm_limit),rpm_limit:i(e.rpm_limit),max_budget:e.max_budget,budget_duration:e.budget_duration,metadata:{...t,guardrails:e.guardrails||[],logging:e.logging_settings||[]},organization_id:e.organization_id};s.max_budget=(0,H.C)(s.max_budget),void 0!==e.team_member_budget&&(s.team_member_budget=Number(e.team_member_budget)),void 0!==e.team_member_key_duration&&(s.team_member_key_duration=e.team_member_key_duration),(void 0!==e.team_member_tpm_limit||void 0!==e.team_member_rpm_limit)&&(s.team_member_tpm_limit=i(e.team_member_tpm_limit),s.team_member_rpm_limit=i(e.team_member_rpm_limit));let{servers:l,accessGroups:a}=e.mcp_servers_and_groups||{servers:[],accessGroups:[]},r=e.mcp_tool_permissions||{};(l&&l.length>0||a&&a.length>0||Object.keys(r).length>0)&&(s.object_permission={},l&&l.length>0&&(s.object_permission.mcp_servers=l),a&&a.length>0&&(s.object_permission.mcp_access_groups=a),Object.keys(r).length>0&&(s.object_permission.mcp_tool_permissions=r)),delete e.mcp_servers_and_groups,delete e.mcp_tool_permissions,await (0,S.teamUpdateCall)(T,s),I.Z.success("Team settings updated successfully"),eh(!1),eN()}catch(e){console.error("Error updating team:",e)}};if(el)return(0,s.jsx)("div",{className:"p-4",children:"Loading..."});if(!(null==ei?void 0:ei.team_info))return(0,s.jsx)("div",{className:"p-4",children:"Team not found"});let{team_info:eS}=ei,eC=async(e,t)=>{await (0,f.vQ)(e)&&(ej(e=>({...e,[t]:!0})),setTimeout(()=>{ej(e=>({...e,[t]:!1}))},2e3))};return(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,s.jsxs)("div",{children:[(0,s.jsx)(r.zx,{icon:B.Z,variant:"light",onClick:M,className:"mb-4",children:"Back to Teams"}),(0,s.jsx)(r.Dx,{children:eS.team_alias}),(0,s.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,s.jsx)(r.xv,{className:"text-gray-500 font-mono",children:eS.team_id}),(0,s.jsx)(N.ZP,{type:"text",size:"small",icon:ev["team-id"]?(0,s.jsx)(Q.Z,{size:12}):(0,s.jsx)(W.Z,{size:12}),onClick:()=>eC(eS.team_id,"team-id"),className:"left-2 z-10 transition-all duration-200 ".concat(ev["team-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]})}),(0,s.jsxs)(r.v0,{defaultIndex:Y?3:0,children:[(0,s.jsx)(r.td,{className:"mb-4",children:[(0,s.jsx)(r.OK,{children:"Overview"},"overview"),...ey?[(0,s.jsx)(r.OK,{children:"Members"},"members"),(0,s.jsx)(r.OK,{children:"Member Permissions"},"member-permissions"),(0,s.jsx)(r.OK,{children:"Settings"},"settings")]:[]]}),(0,s.jsxs)(r.nP,{children:[(0,s.jsx)(r.x4,{children:(0,s.jsxs)(r.rj,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,s.jsxs)(r.Zb,{children:[(0,s.jsx)(r.xv,{children:"Budget Status"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(r.Dx,{children:["$",(0,f.pw)(eS.spend,4)]}),(0,s.jsxs)(r.xv,{children:["of ",null===eS.max_budget?"Unlimited":"$".concat((0,f.pw)(eS.max_budget,4))]}),eS.budget_duration&&(0,s.jsxs)(r.xv,{className:"text-gray-500",children:["Reset: ",eS.budget_duration]}),(0,s.jsx)("br",{}),eS.team_member_budget_table&&(0,s.jsxs)(r.xv,{className:"text-gray-500",children:["Team Member Budget: $",(0,f.pw)(eS.team_member_budget_table.max_budget,4)]})]})]}),(0,s.jsxs)(r.Zb,{children:[(0,s.jsx)(r.xv,{children:"Rate Limits"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(r.xv,{children:["TPM: ",eS.tpm_limit||"Unlimited"]}),(0,s.jsxs)(r.xv,{children:["RPM: ",eS.rpm_limit||"Unlimited"]}),eS.max_parallel_requests&&(0,s.jsxs)(r.xv,{children:["Max Parallel Requests: ",eS.max_parallel_requests]})]})]}),(0,s.jsxs)(r.Zb,{children:[(0,s.jsx)(r.xv,{children:"Models"}),(0,s.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:0===eS.models.length?(0,s.jsx)(r.Ct,{color:"red",children:"All proxy models"}):eS.models.map((e,t)=>(0,s.jsx)(r.Ct,{color:"red",children:e},t))})]}),(0,s.jsxs)(r.Zb,{children:[(0,s.jsx)(r.xv,{className:"font-semibold text-gray-900",children:"Virtual Keys"}),(0,s.jsxs)("div",{className:"mt-2",children:[(0,s.jsxs)(r.xv,{children:["User Keys: ",ei.keys.filter(e=>e.user_id).length]}),(0,s.jsxs)(r.xv,{children:["Service Account Keys: ",ei.keys.filter(e=>!e.user_id).length]}),(0,s.jsxs)(r.xv,{className:"text-gray-500",children:["Total: ",ei.keys.length]})]})]}),(0,s.jsx)(V.Z,{objectPermission:eS.object_permission,variant:"card",accessToken:T}),(0,s.jsx)(J.Z,{loggingConfigs:(null===(t=eS.metadata)||void 0===t?void 0:t.logging)||[],disabledCallbacks:[],variant:"card"})]})}),(0,s.jsx)(r.x4,{children:(0,s.jsx)(Z,{teamData:ei,canEditTeam:ey,handleMemberDelete:eM,setSelectedEditMember:eu,setIsEditMemberModalVisible:eo,setIsAddMemberModalVisible:en})}),ey&&(0,s.jsx)(r.x4,{children:(0,s.jsx)(E,{teamId:w,accessToken:T,canEditTeam:ey})}),(0,s.jsx)(r.x4,{children:(0,s.jsxs)(r.Zb,{className:"overflow-y-auto max-h-[65vh]",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,s.jsx)(r.Dx,{children:"Team Settings"}),ey&&!ex&&(0,s.jsx)(r.zx,{onClick:()=>eh(!0),children:"Edit Settings"})]}),ex?(0,s.jsxs)(z.Z,{form:em,onFinish:eT,initialValues:{...eS,team_alias:eS.team_alias,models:eS.models,tpm_limit:eS.tpm_limit,rpm_limit:eS.rpm_limit,max_budget:eS.max_budget,budget_duration:eS.budget_duration,team_member_tpm_limit:null===(i=eS.team_member_budget_table)||void 0===i?void 0:i.tpm_limit,team_member_rpm_limit:null===(n=eS.team_member_budget_table)||void 0===n?void 0:n.rpm_limit,guardrails:(null===(m=eS.metadata)||void 0===m?void 0:m.guardrails)||[],metadata:eS.metadata?JSON.stringify((e=>{let{logging:t,...i}=e;return i})(eS.metadata),null,2):"",logging_settings:(null===(d=eS.metadata)||void 0===d?void 0:d.logging)||[],organization_id:eS.organization_id,vector_stores:(null===(o=eS.object_permission)||void 0===o?void 0:o.vector_stores)||[],mcp_servers:(null===(c=eS.object_permission)||void 0===c?void 0:c.mcp_servers)||[],mcp_access_groups:(null===(u=eS.object_permission)||void 0===u?void 0:u.mcp_access_groups)||[],mcp_servers_and_groups:{servers:(null===(x=eS.object_permission)||void 0===x?void 0:x.mcp_servers)||[],accessGroups:(null===(h=eS.object_permission)||void 0===h?void 0:h.mcp_access_groups)||[]},mcp_tool_permissions:(null===(_=eS.object_permission)||void 0===_?void 0:_.mcp_tool_permissions)||{}},layout:"vertical",children:[(0,s.jsx)(z.Z.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,s.jsx)(D.default,{type:""})}),(0,s.jsx)(z.Z.Item,{label:"Models",name:"models",children:(0,s.jsxs)(F.default,{mode:"multiple",placeholder:"Select models",children:[(0,s.jsx)(F.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),Array.from(new Set(L)).map((e,t)=>(0,s.jsx)(F.default.Option,{value:e,children:(0,O.W0)(e)},t))]})}),(0,s.jsx)(z.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,s.jsx)(a.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,s.jsx)(z.Z.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",tooltip:"This is the individual budget for a user in the team.",children:(0,s.jsx)(a.Z,{step:.01,precision:2,style:{width:"100%"}})}),(0,s.jsx)(z.Z.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,s.jsx)(r.oi,{placeholder:"e.g., 30d"})}),(0,s.jsx)(z.Z.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"Default tokens per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,s.jsx)(a.Z,{step:1,style:{width:"100%"},placeholder:"e.g., 1000"})}),(0,s.jsx)(z.Z.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"Default requests per minute limit for an individual team member. This limit applies to all requests the user makes within this team. Can be overridden per member.",children:(0,s.jsx)(a.Z,{step:1,style:{width:"100%"},placeholder:"e.g., 100"})}),(0,s.jsx)(z.Z.Item,{label:"Reset Budget",name:"budget_duration",children:(0,s.jsxs)(F.default,{placeholder:"n/a",children:[(0,s.jsx)(F.default.Option,{value:"24h",children:"daily"}),(0,s.jsx)(F.default.Option,{value:"7d",children:"weekly"}),(0,s.jsx)(F.default.Option,{value:"30d",children:"monthly"})]})}),(0,s.jsx)(z.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,s.jsx)(a.Z,{step:1,style:{width:"100%"}})}),(0,s.jsx)(z.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,s.jsx)(a.Z,{step:1,style:{width:"100%"}})}),(0,s.jsx)(z.Z.Item,{label:(0,s.jsxs)("span",{children:["Guardrails"," ",(0,s.jsx)(b.Z,{title:"Setup your first guardrail",children:(0,s.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",help:"Select existing guardrails or enter new ones",children:(0,s.jsx)(F.default,{mode:"tags",placeholder:"Select or enter guardrails",options:ef.map(e=>({value:e,label:e}))})}),(0,s.jsx)(z.Z.Item,{label:"Vector Stores",name:"vector_stores",children:(0,s.jsx)(q.Z,{onChange:e=>em.setFieldValue("vector_stores",e),value:em.getFieldValue("vector_stores"),accessToken:T||"",placeholder:"Select vector stores"})}),(0,s.jsx)(z.Z.Item,{label:"Allowed Pass Through Routes",name:"allowed_passthrough_routes",children:(0,s.jsx)(X.Z,{onChange:e=>em.setFieldValue("allowed_passthrough_routes",e),value:em.getFieldValue("allowed_passthrough_routes"),accessToken:T||"",placeholder:"Select pass through routes"})}),(0,s.jsx)(z.Z.Item,{label:"MCP Servers / Access Groups",name:"mcp_servers_and_groups",children:(0,s.jsx)(K.Z,{onChange:e=>em.setFieldValue("mcp_servers_and_groups",e),value:em.getFieldValue("mcp_servers_and_groups"),accessToken:T||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,s.jsx)(z.Z.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,s.jsx)(D.default,{type:"hidden"})}),(0,s.jsx)(z.Z.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.mcp_servers_and_groups!==t.mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>{var e;return(0,s.jsx)("div",{className:"mb-6",children:(0,s.jsx)(G.Z,{accessToken:T||"",selectedServers:(null===(e=em.getFieldValue("mcp_servers_and_groups"))||void 0===e?void 0:e.servers)||[],toolPermissions:em.getFieldValue("mcp_tool_permissions")||{},onChange:e=>em.setFieldsValue({mcp_tool_permissions:e})})})}}),(0,s.jsx)(z.Z.Item,{label:"Organization ID",name:"organization_id",children:(0,s.jsx)(D.default,{type:""})}),(0,s.jsx)(z.Z.Item,{label:"Logging Settings",name:"logging_settings",children:(0,s.jsx)($.Z,{value:em.getFieldValue("logging_settings"),onChange:e=>em.setFieldValue("logging_settings",e)})}),(0,s.jsx)(z.Z.Item,{label:"Metadata",name:"metadata",children:(0,s.jsx)(D.default.TextArea,{rows:10})}),(0,s.jsx)("div",{className:"sticky z-10 bg-white p-4 border-t border-gray-200 bottom-[-1.5rem] inset-x-[-1.5rem]",children:(0,s.jsxs)("div",{className:"flex justify-end items-center gap-2",children:[(0,s.jsx)(N.ZP,{htmlType:"button",onClick:()=>eh(!1),children:"Cancel"}),(0,s.jsx)(r.zx,{type:"submit",children:"Save Changes"})]})})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Team Name"}),(0,s.jsx)("div",{children:eS.team_alias})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Team ID"}),(0,s.jsx)("div",{className:"font-mono",children:eS.team_id})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Created At"}),(0,s.jsx)("div",{children:new Date(eS.created_at).toLocaleString()})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Models"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:eS.models.map((e,t)=>(0,s.jsx)(r.Ct,{color:"red",children:e},t))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Rate Limits"}),(0,s.jsxs)("div",{children:["TPM: ",eS.tpm_limit||"Unlimited"]}),(0,s.jsxs)("div",{children:["RPM: ",eS.rpm_limit||"Unlimited"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Team Budget"}),(0,s.jsxs)("div",{children:["Max Budget:"," ",null!==eS.max_budget?"$".concat((0,f.pw)(eS.max_budget,4)):"No Limit"]}),(0,s.jsxs)("div",{children:["Budget Reset: ",eS.budget_duration||"Never"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)(r.xv,{className:"font-medium",children:["Team Member Settings"," ",(0,s.jsx)(b.Z,{title:"These are limits on individual team members",children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})]}),(0,s.jsxs)("div",{children:["Max Budget: ",(null===(g=eS.team_member_budget_table)||void 0===g?void 0:g.max_budget)||"No Limit"]}),(0,s.jsxs)("div",{children:["Key Duration: ",(null===(v=eS.metadata)||void 0===v?void 0:v.team_member_key_duration)||"No Limit"]}),(0,s.jsxs)("div",{children:["TPM Limit: ",(null===(j=eS.team_member_budget_table)||void 0===j?void 0:j.tpm_limit)||"No Limit"]}),(0,s.jsxs)("div",{children:["RPM Limit: ",(null===(y=eS.team_member_budget_table)||void 0===y?void 0:y.rpm_limit)||"No Limit"]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Organization ID"}),(0,s.jsx)("div",{children:eS.organization_id})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(r.xv,{className:"font-medium",children:"Status"}),(0,s.jsx)(r.Ct,{color:eS.blocked?"red":"green",children:eS.blocked?"Blocked":"Active"})]}),(0,s.jsx)(V.Z,{objectPermission:eS.object_permission,variant:"inline",className:"pt-4 border-t border-gray-200",accessToken:T}),(0,s.jsx)(J.Z,{loggingConfigs:(null===(k=eS.metadata)||void 0===k?void 0:k.logging)||[],disabledCallbacks:[],variant:"inline",className:"pt-4 border-t border-gray-200"})]})]})})]})]}),(0,s.jsx)(R.Z,{visible:ed,onCancel:()=>eo(!1),onSubmit:ew,initialData:ec,mode:"edit",config:{title:"Edit Member",showEmail:!0,showUserId:!0,roleOptions:[{label:"Admin",value:"admin"},{label:"User",value:"user"}],additionalFields:[{name:"max_budget_in_team",label:(0,s.jsxs)("span",{children:["Team Member Budget (USD)"," ",(0,s.jsx)(b.Z,{title:"Maximum amount in USD this member can spend within this team. This is separate from any global user budget limits",children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:.01,min:0,placeholder:"Budget limit for this member within this team"},{name:"tpm_limit",label:(0,s.jsxs)("span",{children:["Team Member TPM Limit"," ",(0,s.jsx)(b.Z,{title:"Maximum tokens per minute this member can use within this team. This is separate from any global user TPM limit",children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Tokens per minute limit for this member in this team"},{name:"rpm_limit",label:(0,s.jsxs)("span",{children:["Team Member RPM Limit"," ",(0,s.jsx)(b.Z,{title:"Maximum requests per minute this member can make within this team. This is separate from any global user RPM limit",children:(0,s.jsx)(p.Z,{style:{marginLeft:"4px"}})})]}),type:"numerical",step:1,min:0,placeholder:"Requests per minute limit for this member in this team"}]}}),(0,s.jsx)(U.Z,{isVisible:er,onCancel:()=>en(!1),onSubmit:ek,accessToken:T})]})}}}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/352-522118f2414c0053.js b/ui/litellm-dashboard/out/_next/static/chunks/352-57ffb92bf8445776.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/352-522118f2414c0053.js rename to ui/litellm-dashboard/out/_next/static/chunks/352-57ffb92bf8445776.js index 867c9eeb66e..87b73b91342 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/352-522118f2414c0053.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/352-57ffb92bf8445776.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[352],{96473:function(t,e,n){n.d(e,{Z:function(){return i}});var a=n(1119),o=n(2265),c={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"},r=n(55015),i=o.forwardRef(function(t,e){return o.createElement(r.Z,(0,a.Z)({},t,{ref:e,icon:c}))})},47323:function(t,e,n){n.d(e,{Z:function(){return p}});var a=n(5853),o=n(2265),c=n(1526),r=n(7084),i=n(97324),l=n(1153),d=n(26898);let s={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"}},u={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"}},b={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:""}},g=(t,e)=>{switch(t){case"simple":return{textColor:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,i.q)((0,l.bM)(e,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,i.q)((0,l.bM)(e,d.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:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:e?(0,i.q)((0,l.bM)(e,d.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:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,i.q)((0,l.bM)(e,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:e?(0,l.bM)(e,d.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:e?(0,i.q)((0,l.bM)(e,d.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},f=(0,l.fn)("Icon"),p=o.forwardRef((t,e)=>{let{icon:n,variant:d="simple",tooltip:p,size:m=r.u8.SM,color:v,className:h}=t,y=(0,a._T)(t,["icon","variant","tooltip","size","color","className"]),k=g(d,v),{tooltipProps:x,getReferenceProps:w}=(0,c.l)();return o.createElement("span",Object.assign({ref:(0,l.lq)([e,x.refs.setReference]),className:(0,i.q)(f("root"),"inline-flex flex-shrink-0 items-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,b[d].rounded,b[d].border,b[d].shadow,b[d].ring,s[m].paddingX,s[m].paddingY,h)},w,y),o.createElement(c.Z,Object.assign({text:p},x)),o.createElement(n,{className:(0,i.q)(f("icon"),"shrink-0",u[m].height,u[m].width)}))});p.displayName="Icon"},67960:function(t,e,n){n.d(e,{Z:function(){return t6}});var a=n(2265),o=n(36760),c=n.n(o),r=n(18694),i=n(71744),l=n(33759),d=t=>{let{prefixCls:e,className:n,style:o,size:r,shape:i}=t,l=c()({["".concat(e,"-lg")]:"large"===r,["".concat(e,"-sm")]:"small"===r}),d=c()({["".concat(e,"-circle")]:"circle"===i,["".concat(e,"-square")]:"square"===i,["".concat(e,"-round")]:"round"===i}),s=a.useMemo(()=>"number"==typeof r?{width:r,height:r,lineHeight:"".concat(r,"px")}:{},[r]);return a.createElement("span",{className:c()(e,l,d,n),style:Object.assign(Object.assign({},s),o)})},s=n(352),u=n(80669),b=n(3104);let g=new s.E4("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),f=t=>({height:t,lineHeight:(0,s.bf)(t)}),p=t=>Object.assign({width:t},f(t)),m=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:g,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),v=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},f(t)),h=t=>{let{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:a,controlHeightLG:o,controlHeightSM:c}=t;return{["".concat(e)]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},p(a)),["".concat(e).concat(e,"-circle")]:{borderRadius:"50%"},["".concat(e).concat(e,"-lg")]:Object.assign({},p(o)),["".concat(e).concat(e,"-sm")]:Object.assign({},p(c))}},y=t=>{let{controlHeight:e,borderRadiusSM:n,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:c,gradientFromColor:r,calc:i}=t;return{["".concat(a)]:Object.assign({display:"inline-block",verticalAlign:"top",background:r,borderRadius:n},v(e,i)),["".concat(a,"-lg")]:Object.assign({},v(o,i)),["".concat(a,"-sm")]:Object.assign({},v(c,i))}},k=t=>Object.assign({width:t},f(t)),x=t=>{let{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:a,borderRadiusSM:o,calc:c}=t;return{["".concat(e)]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:a,borderRadius:o},k(c(n).mul(2).equal())),{["".concat(e,"-path")]:{fill:"#bfbfbf"},["".concat(e,"-svg")]:Object.assign(Object.assign({},k(n)),{maxWidth:c(n).mul(4).equal(),maxHeight:c(n).mul(4).equal()}),["".concat(e,"-svg").concat(e,"-svg-circle")]:{borderRadius:"50%"}}),["".concat(e).concat(e,"-circle")]:{borderRadius:"50%"}}},w=(t,e,n)=>{let{skeletonButtonCls:a}=t;return{["".concat(n).concat(a,"-circle")]:{width:e,minWidth:e,borderRadius:"50%"},["".concat(n).concat(a,"-round")]:{borderRadius:e}}},S=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},f(t)),C=t=>{let{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:a,controlHeightLG:o,controlHeightSM:c,gradientFromColor:r,calc:i}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:r,borderRadius:e,width:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},S(a,i))},w(t,a,n)),{["".concat(n,"-lg")]:Object.assign({},S(o,i))}),w(t,o,"".concat(n,"-lg"))),{["".concat(n,"-sm")]:Object.assign({},S(c,i))}),w(t,c,"".concat(n,"-sm")))},E=t=>{let{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:c,skeletonInputCls:r,skeletonImageCls:i,controlHeight:l,controlHeightLG:d,controlHeightSM:s,gradientFromColor:u,padding:b,marginSM:g,borderRadius:f,titleHeight:v,blockRadius:k,paragraphLiHeight:w,controlHeightXS:S,paragraphMarginTop:E}=t;return{["".concat(e)]:{display:"table",width:"100%",["".concat(e,"-header")]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:u},p(l)),["".concat(n,"-circle")]:{borderRadius:"50%"},["".concat(n,"-lg")]:Object.assign({},p(d)),["".concat(n,"-sm")]:Object.assign({},p(s))},["".concat(e,"-content")]:{display:"table-cell",width:"100%",verticalAlign:"top",["".concat(a)]:{width:"100%",height:v,background:u,borderRadius:k,["+ ".concat(o)]:{marginBlockStart:s}},["".concat(o)]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:u,borderRadius:k,"+ li":{marginBlockStart:S}}},["".concat(o,"> li:last-child:not(:first-child):not(:nth-child(2))")]:{width:"61%"}},["&-round ".concat(e,"-content")]:{["".concat(a,", ").concat(o," > li")]:{borderRadius:f}}},["".concat(e,"-with-avatar ").concat(e,"-content")]:{["".concat(a)]:{marginBlockStart:g,["+ ".concat(o)]:{marginBlockStart:E}}},["".concat(e).concat(e,"-element")]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},C(t)),h(t)),y(t)),x(t)),["".concat(e).concat(e,"-block")]:{width:"100%",["".concat(c)]:{width:"100%"},["".concat(r)]:{width:"100%"}},["".concat(e).concat(e,"-active")]:{["\n ".concat(a,",\n ").concat(o," > li,\n ").concat(n,",\n ").concat(c,",\n ").concat(r,",\n ").concat(i,"\n ")]:Object.assign({},m(t))}}};var O=(0,u.I$)("Skeleton",t=>{let{componentCls:e,calc:n}=t;return[E((0,b.TS)(t,{skeletonAvatarCls:"".concat(e,"-avatar"),skeletonTitleCls:"".concat(e,"-title"),skeletonParagraphCls:"".concat(e,"-paragraph"),skeletonButtonCls:"".concat(e,"-button"),skeletonInputCls:"".concat(e,"-input"),skeletonImageCls:"".concat(e,"-image"),imageSizeBase:n(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:"linear-gradient(90deg, ".concat(t.gradientFromColor," 25%, ").concat(t.gradientToColor," 37%, ").concat(t.gradientFromColor," 63%)"),skeletonLoadingMotionDuration:"1.4s"}))]},t=>{let{colorFillContent:e,colorFill:n}=t;return{color:e,colorGradientEnd:n,gradientFromColor:e,gradientToColor:n,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),_=n(1119),j={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"},R=n(55015),Z=a.forwardRef(function(t,e){return a.createElement(R.Z,(0,_.Z)({},t,{ref:e,icon:j}))}),T=n(83145),N=t=>{let e=e=>{let{width:n,rows:a=2}=t;return Array.isArray(n)?n[e]:a-1===e?n:void 0},{prefixCls:n,className:o,style:r,rows:i}=t,l=(0,T.Z)(Array(i)).map((t,n)=>a.createElement("li",{key:n,style:{width:e(n)}}));return a.createElement("ul",{className:c()(n,o),style:r},l)},z=t=>{let{prefixCls:e,className:n,width:o,style:r}=t;return a.createElement("h3",{className:c()(e,n),style:Object.assign({width:o},r)})};function M(t){return t&&"object"==typeof t?t:{}}let P=t=>{let{prefixCls:e,loading:n,className:o,rootClassName:r,style:l,children:s,avatar:u=!1,title:b=!0,paragraph:g=!0,active:f,round:p}=t,{getPrefixCls:m,direction:v,skeleton:h}=a.useContext(i.E_),y=m("skeleton",e),[k,x,w]=O(y);if(n||!("loading"in t)){let t,e;let n=!!u,i=!!b,s=!!g;if(n){let e=Object.assign(Object.assign({prefixCls:"".concat(y,"-avatar")},i&&!s?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),M(u));t=a.createElement("div",{className:"".concat(y,"-header")},a.createElement(d,Object.assign({},e)))}if(i||s){let t,o;if(i){let e=Object.assign(Object.assign({prefixCls:"".concat(y,"-title")},!n&&s?{width:"38%"}:n&&s?{width:"50%"}:{}),M(b));t=a.createElement(z,Object.assign({},e))}if(s){let t=Object.assign(Object.assign({prefixCls:"".concat(y,"-paragraph")},function(t,e){let n={};return t&&e||(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}(n,i)),M(g));o=a.createElement(N,Object.assign({},t))}e=a.createElement("div",{className:"".concat(y,"-content")},t,o)}let m=c()(y,{["".concat(y,"-with-avatar")]:n,["".concat(y,"-active")]:f,["".concat(y,"-rtl")]:"rtl"===v,["".concat(y,"-round")]:p},null==h?void 0:h.className,o,r,x,w);return k(a.createElement("div",{className:m,style:Object.assign(Object.assign({},null==h?void 0:h.style),l)},t,e))}return void 0!==s?s:null};P.Button=t=>{let{prefixCls:e,className:n,rootClassName:o,active:l,block:s=!1,size:u="default"}=t,{getPrefixCls:b}=a.useContext(i.E_),g=b("skeleton",e),[f,p,m]=O(g),v=(0,r.Z)(t,["prefixCls"]),h=c()(g,"".concat(g,"-element"),{["".concat(g,"-active")]:l,["".concat(g,"-block")]:s},n,o,p,m);return f(a.createElement("div",{className:h},a.createElement(d,Object.assign({prefixCls:"".concat(g,"-button"),size:u},v))))},P.Avatar=t=>{let{prefixCls:e,className:n,rootClassName:o,active:l,shape:s="circle",size:u="default"}=t,{getPrefixCls:b}=a.useContext(i.E_),g=b("skeleton",e),[f,p,m]=O(g),v=(0,r.Z)(t,["prefixCls","className"]),h=c()(g,"".concat(g,"-element"),{["".concat(g,"-active")]:l},n,o,p,m);return f(a.createElement("div",{className:h},a.createElement(d,Object.assign({prefixCls:"".concat(g,"-avatar"),shape:s,size:u},v))))},P.Input=t=>{let{prefixCls:e,className:n,rootClassName:o,active:l,block:s,size:u="default"}=t,{getPrefixCls:b}=a.useContext(i.E_),g=b("skeleton",e),[f,p,m]=O(g),v=(0,r.Z)(t,["prefixCls"]),h=c()(g,"".concat(g,"-element"),{["".concat(g,"-active")]:l,["".concat(g,"-block")]:s},n,o,p,m);return f(a.createElement("div",{className:h},a.createElement(d,Object.assign({prefixCls:"".concat(g,"-input"),size:u},v))))},P.Image=t=>{let{prefixCls:e,className:n,rootClassName:o,style:r,active:l}=t,{getPrefixCls:d}=a.useContext(i.E_),s=d("skeleton",e),[u,b,g]=O(s),f=c()(s,"".concat(s,"-element"),{["".concat(s,"-active")]:l},n,o,b,g);return u(a.createElement("div",{className:f},a.createElement("div",{className:c()("".concat(s,"-image"),n),style:r},a.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:"".concat(s,"-image-svg")},a.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(s,"-image-path")})))))},P.Node=t=>{let{prefixCls:e,className:n,rootClassName:o,style:r,active:l,children:d}=t,{getPrefixCls:s}=a.useContext(i.E_),u=s("skeleton",e),[b,g,f]=O(u),p=c()(u,"".concat(u,"-element"),{["".concat(u,"-active")]:l},g,n,o,f),m=null!=d?d:a.createElement(Z,null);return b(a.createElement("div",{className:p},a.createElement("div",{className:c()("".concat(u,"-image"),n),style:r},m)))};var I=n(49638),L=n(60440),B=n(96473),D=n(11993),W=n(31686),q=n(26365),G=n(41154),H=n(6989),A=n(50506),X=n(79267),K=(0,a.createContext)(null),F=n(31474),Y=n(58525),V=n(28791),Q=n(53346),$=function(t){var e=t.activeTabOffset,n=t.horizontal,o=t.rtl,c=t.indicator,r=void 0===c?{}:c,i=r.size,l=r.align,d=void 0===l?"center":l,s=(0,a.useState)(),u=(0,q.Z)(s,2),b=u[0],g=u[1],f=(0,a.useRef)(),p=a.useCallback(function(t){return"function"==typeof i?i(t):"number"==typeof i?i:t},[i]);function m(){Q.Z.cancel(f.current)}return(0,a.useEffect)(function(){var t={};if(e){if(n){t.width=p(e.width);var a=o?"right":"left";"start"===d&&(t[a]=e[a]),"center"===d&&(t[a]=e[a]+e.width/2,t.transform=o?"translateX(50%)":"translateX(-50%)"),"end"===d&&(t[a]=e[a]+e.width,t.transform="translateX(-100%)")}else t.height=p(e.height),"start"===d&&(t.top=e.top),"center"===d&&(t.top=e.top+e.height/2,t.transform="translateY(-50%)"),"end"===d&&(t.top=e.top+e.height,t.transform="translateY(-100%)")}return m(),f.current=(0,Q.Z)(function(){g(t)}),m},[e,n,o,d,p]),{style:b}},J={width:0,height:0,left:0,top:0};function U(t,e){var n=a.useRef(t),o=a.useState({}),c=(0,q.Z)(o,2)[1];return[n.current,function(t){var a="function"==typeof t?t(n.current):t;a!==n.current&&e(a,n.current),n.current=a,c({})}]}var tt=n(27380);function te(t){var e=(0,a.useState)(0),n=(0,q.Z)(e,2),o=n[0],c=n[1],r=(0,a.useRef)(0),i=(0,a.useRef)();return i.current=t,(0,tt.o)(function(){var t;null===(t=i.current)||void 0===t||t.call(i)},[o]),function(){r.current===o&&(r.current+=1,c(r.current))}}var tn={width:0,height:0,left:0,top:0,right:0};function ta(t){var e;return t instanceof Map?(e={},t.forEach(function(t,n){e[n]=t})):e=t,JSON.stringify(e)}function to(t){return String(t).replace(/"/g,"TABS_DQ")}function tc(t,e,n,a){return!!n&&!a&&!1!==t&&(void 0!==t||!1!==e&&null!==e)}var tr=a.forwardRef(function(t,e){var n=t.prefixCls,o=t.editable,c=t.locale,r=t.style;return o&&!1!==o.showAdd?a.createElement("button",{ref:e,type:"button",className:"".concat(n,"-nav-add"),style:r,"aria-label":(null==c?void 0:c.addAriaLabel)||"Add tab",onClick:function(t){o.onEdit("add",{event:t})}},o.addIcon||"+"):null}),ti=a.forwardRef(function(t,e){var n,o=t.position,c=t.prefixCls,r=t.extra;if(!r)return null;var i={};return"object"!==(0,G.Z)(r)||a.isValidElement(r)?i.right=r:i=r,"right"===o&&(n=i.right),"left"===o&&(n=i.left),n?a.createElement("div",{className:"".concat(c,"-extra-content"),ref:e},n):null}),tl=n(71030),td=n(33082),ts=n(95814),tu=a.forwardRef(function(t,e){var n=t.prefixCls,o=t.id,r=t.tabs,i=t.locale,l=t.mobile,d=t.moreIcon,s=t.moreTransitionName,u=t.style,b=t.className,g=t.editable,f=t.tabBarGutter,p=t.rtl,m=t.removeAriaLabel,v=t.onTabClick,h=t.getPopupContainer,y=t.popupClassName,k=(0,a.useState)(!1),x=(0,q.Z)(k,2),w=x[0],S=x[1],C=(0,a.useState)(null),E=(0,q.Z)(C,2),O=E[0],_=E[1],j="".concat(o,"-more-popup"),R="".concat(n,"-dropdown"),Z=null!==O?"".concat(j,"-").concat(O):null,T=null==i?void 0:i.dropdownAriaLabel,N=a.createElement(td.ZP,{onClick:function(t){v(t.key,t.domEvent),S(!1)},prefixCls:"".concat(R,"-menu"),id:j,tabIndex:-1,role:"listbox","aria-activedescendant":Z,selectedKeys:[O],"aria-label":void 0!==T?T:"expanded dropdown"},r.map(function(t){var e=t.closable,n=t.disabled,c=t.closeIcon,r=t.key,i=t.label,l=tc(e,c,g,n);return a.createElement(td.sN,{key:r,id:"".concat(j,"-").concat(r),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(r),disabled:n},a.createElement("span",null,i),l&&a.createElement("button",{type:"button","aria-label":m||"remove",tabIndex:0,className:"".concat(R,"-menu-item-remove"),onClick:function(t){t.stopPropagation(),t.preventDefault(),t.stopPropagation(),g.onEdit("remove",{key:r,event:t})}},c||g.removeIcon||"\xd7"))}));function z(t){for(var e=r.filter(function(t){return!t.disabled}),n=e.findIndex(function(t){return t.key===O})||0,a=e.length,o=0;oMath.abs(i-n)?[i,l,d-e.x,s-e.y]:[n,a,c,o]},tp=function(t){var e=t.current||{},n=e.offsetWidth,a=void 0===n?0:n,o=e.offsetHeight;if(t.current){var c=t.current.getBoundingClientRect(),r=c.width,i=c.height;if(1>Math.abs(r-a))return[r,i]}return[a,void 0===o?0:o]},tm=function(t,e){return t[e?0:1]},tv=a.forwardRef(function(t,e){var n,o,r,i,l,d,s,u,b,g,f,p,m,v,h,y,k,x,w,S,C,E,O,j,R,Z,N,z,M,P,I,L,B,G,H,A,X,Q,tt,tc=t.className,tl=t.style,td=t.id,ts=t.animated,tu=t.activeKey,tv=t.rtl,th=t.extra,ty=t.editable,tk=t.locale,tx=t.tabPosition,tw=t.tabBarGutter,tS=t.children,tC=t.onTabClick,tE=t.onTabScroll,tO=t.indicator,t_=a.useContext(K),tj=t_.prefixCls,tR=t_.tabs,tZ=(0,a.useRef)(null),tT=(0,a.useRef)(null),tN=(0,a.useRef)(null),tz=(0,a.useRef)(null),tM=(0,a.useRef)(null),tP=(0,a.useRef)(null),tI=(0,a.useRef)(null),tL="top"===tx||"bottom"===tx,tB=U(0,function(t,e){tL&&tE&&tE({direction:t>e?"left":"right"})}),tD=(0,q.Z)(tB,2),tW=tD[0],tq=tD[1],tG=U(0,function(t,e){!tL&&tE&&tE({direction:t>e?"top":"bottom"})}),tH=(0,q.Z)(tG,2),tA=tH[0],tX=tH[1],tK=(0,a.useState)([0,0]),tF=(0,q.Z)(tK,2),tY=tF[0],tV=tF[1],tQ=(0,a.useState)([0,0]),t$=(0,q.Z)(tQ,2),tJ=t$[0],tU=t$[1],t0=(0,a.useState)([0,0]),t1=(0,q.Z)(t0,2),t2=t1[0],t4=t1[1],t5=(0,a.useState)([0,0]),t7=(0,q.Z)(t5,2),t8=t7[0],t6=t7[1],t3=(n=new Map,o=(0,a.useRef)([]),r=(0,a.useState)({}),i=(0,q.Z)(r,2)[1],l=(0,a.useRef)("function"==typeof n?n():n),d=te(function(){var t=l.current;o.current.forEach(function(e){t=e(t)}),o.current=[],l.current=t,i({})}),[l.current,function(t){o.current.push(t),d()}]),t9=(0,q.Z)(t3,2),et=t9[0],ee=t9[1],en=(s=tJ[0],(0,a.useMemo)(function(){for(var t=new Map,e=et.get(null===(o=tR[0])||void 0===o?void 0:o.key)||J,n=e.left+e.width,a=0;aeu?eu:t}tL&&tv?(es=0,eu=Math.max(0,eo-el)):(es=Math.min(0,el-eo),eu=0);var eg=(0,a.useRef)(null),ef=(0,a.useState)(),ep=(0,q.Z)(ef,2),em=ep[0],ev=ep[1];function eh(){ev(Date.now())}function ey(){eg.current&&clearTimeout(eg.current)}u=function(t,e){function n(t,e){t(function(t){return eb(t+e)})}return!!ei&&(tL?n(tq,t):n(tX,e),ey(),eh(),!0)},b=(0,a.useState)(),f=(g=(0,q.Z)(b,2))[0],p=g[1],m=(0,a.useState)(0),h=(v=(0,q.Z)(m,2))[0],y=v[1],k=(0,a.useState)(0),w=(x=(0,q.Z)(k,2))[0],S=x[1],C=(0,a.useState)(),O=(E=(0,q.Z)(C,2))[0],j=E[1],R=(0,a.useRef)(),Z=(0,a.useRef)(),(N=(0,a.useRef)(null)).current={onTouchStart:function(t){var e=t.touches[0];p({x:e.screenX,y:e.screenY}),window.clearInterval(R.current)},onTouchMove:function(t){if(f){t.preventDefault();var e=t.touches[0],n=e.screenX,a=e.screenY;p({x:n,y:a});var o=n-f.x,c=a-f.y;u(o,c);var r=Date.now();y(r),S(r-h),j({x:o,y:c})}},onTouchEnd:function(){if(f&&(p(null),j(null),O)){var t=O.x/w,e=O.y/w;if(!(.1>Math.max(Math.abs(t),Math.abs(e)))){var n=t,a=e;R.current=window.setInterval(function(){if(.01>Math.abs(n)&&.01>Math.abs(a)){window.clearInterval(R.current);return}n*=.9046104802746175,a*=.9046104802746175,u(20*n,20*a)},20)}}},onWheel:function(t){var e=t.deltaX,n=t.deltaY,a=0,o=Math.abs(e),c=Math.abs(n);o===c?a="x"===Z.current?e:n:o>c?(a=e,Z.current="x"):(a=n,Z.current="y"),u(-a,-a)&&t.preventDefault()}},a.useEffect(function(){function t(t){N.current.onTouchMove(t)}function e(t){N.current.onTouchEnd(t)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",e,{passive:!1}),tz.current.addEventListener("touchstart",function(t){N.current.onTouchStart(t)},{passive:!1}),tz.current.addEventListener("wheel",function(t){N.current.onWheel(t)}),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",e)}},[]),(0,a.useEffect)(function(){return ey(),em&&(eg.current=setTimeout(function(){ev(0)},100)),ey},[em]);var ek=(z=tL?tW:tA,B=(M=(0,W.Z)((0,W.Z)({},t),{},{tabs:tR})).tabs,G=M.tabPosition,H=M.rtl,["top","bottom"].includes(G)?(P="width",I=H?"right":"left",L=Math.abs(z)):(P="height",I="top",L=-z),(0,a.useMemo)(function(){if(!B.length)return[0,0];for(var t=B.length,e=t,n=0;nL+el){e=n-1;break}}for(var o=0,c=t-1;c>=0;c-=1)if((en.get(B[c].key)||tn)[I]=e?[0,0]:[o,e]},[en,el,eo,ec,er,L,G,B.map(function(t){return t.key}).join("_"),H])),ex=(0,q.Z)(ek,2),ew=ex[0],eS=ex[1],eC=(0,Y.Z)(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tu,e=en.get(t)||{width:0,height:0,left:0,right:0,top:0};if(tL){var n=tW;tv?e.righttW+el&&(n=e.right+e.width-el):e.left<-tW?n=-e.left:e.left+e.width>-tW+el&&(n=-(e.left+e.width-el)),tX(0),tq(eb(n))}else{var a=tA;e.top<-tA?a=-e.top:e.top+e.height>-tA+el&&(a=-(e.top+e.height-el)),tq(0),tX(eb(a))}}),eE={};"top"===tx||"bottom"===tx?eE[tv?"marginRight":"marginLeft"]=tw:eE.marginTop=tw;var eO=tR.map(function(t,e){var n=t.key;return a.createElement(tg,{id:td,prefixCls:tj,key:n,tab:t,style:0===e?void 0:eE,closable:t.closable,editable:ty,active:n===tu,renderWrapper:tS,removeAriaLabel:null==tk?void 0:tk.removeAriaLabel,onClick:function(t){tC(n,t)},onFocus:function(){eC(n),eh(),tz.current&&(tv||(tz.current.scrollLeft=0),tz.current.scrollTop=0)}})}),e_=function(){return ee(function(){var t,e=new Map,n=null===(t=tM.current)||void 0===t?void 0:t.getBoundingClientRect();return tR.forEach(function(t){var a,o=t.key,c=null===(a=tM.current)||void 0===a?void 0:a.querySelector('[data-node-key="'.concat(to(o),'"]'));if(c){var r=tf(c,n),i=(0,q.Z)(r,4),l=i[0],d=i[1],s=i[2],u=i[3];e.set(o,{width:l,height:d,left:s,top:u})}}),e})};(0,a.useEffect)(function(){e_()},[tR.map(function(t){return t.key}).join("_")]);var ej=te(function(){var t=tp(tZ),e=tp(tT),n=tp(tN);tV([t[0]-e[0]-n[0],t[1]-e[1]-n[1]]);var a=tp(tI);t4(a),t6(tp(tP));var o=tp(tM);tU([o[0]-a[0],o[1]-a[1]]),e_()}),eR=tR.slice(0,ew),eZ=tR.slice(eS+1),eT=[].concat((0,T.Z)(eR),(0,T.Z)(eZ)),eN=en.get(tu),ez=$({activeTabOffset:eN,horizontal:tL,indicator:tO,rtl:tv}).style;(0,a.useEffect)(function(){eC()},[tu,es,eu,ta(eN),ta(en),tL]),(0,a.useEffect)(function(){ej()},[tv]);var eM=!!eT.length,eP="".concat(tj,"-nav-wrap");return tL?tv?(X=tW>0,A=tW!==eu):(A=tW<0,X=tW!==es):(Q=tA<0,tt=tA!==es),a.createElement(F.Z,{onResize:ej},a.createElement("div",{ref:(0,V.x1)(e,tZ),role:"tablist",className:c()("".concat(tj,"-nav"),tc),style:tl,onKeyDown:function(){eh()}},a.createElement(ti,{ref:tT,position:"left",extra:th,prefixCls:tj}),a.createElement(F.Z,{onResize:ej},a.createElement("div",{className:c()(eP,(0,D.Z)((0,D.Z)((0,D.Z)((0,D.Z)({},"".concat(eP,"-ping-left"),A),"".concat(eP,"-ping-right"),X),"".concat(eP,"-ping-top"),Q),"".concat(eP,"-ping-bottom"),tt)),ref:tz},a.createElement(F.Z,{onResize:ej},a.createElement("div",{ref:tM,className:"".concat(tj,"-nav-list"),style:{transform:"translate(".concat(tW,"px, ").concat(tA,"px)"),transition:em?"none":void 0}},eO,a.createElement(tr,{ref:tI,prefixCls:tj,locale:tk,editable:ty,style:(0,W.Z)((0,W.Z)({},0===eO.length?void 0:eE),{},{visibility:eM?"hidden":null})}),a.createElement("div",{className:c()("".concat(tj,"-ink-bar"),(0,D.Z)({},"".concat(tj,"-ink-bar-animated"),ts.inkBar)),style:ez}))))),a.createElement(tb,(0,_.Z)({},t,{removeAriaLabel:null==tk?void 0:tk.removeAriaLabel,ref:tP,prefixCls:tj,tabs:eT,className:!eM&&ed,tabMoving:!!em})),a.createElement(ti,{ref:tN,position:"right",extra:th,prefixCls:tj})))}),th=a.forwardRef(function(t,e){var n=t.prefixCls,o=t.className,r=t.style,i=t.id,l=t.active,d=t.tabKey,s=t.children;return a.createElement("div",{id:i&&"".concat(i,"-panel-").concat(d),role:"tabpanel",tabIndex:l?0:-1,"aria-labelledby":i&&"".concat(i,"-tab-").concat(d),"aria-hidden":!l,style:r,className:c()(n,l&&"".concat(n,"-active"),o),ref:e},s)}),ty=["renderTabBar"],tk=["label","key"],tx=function(t){var e=t.renderTabBar,n=(0,H.Z)(t,ty),o=a.useContext(K).tabs;return e?e((0,W.Z)((0,W.Z)({},n),{},{panes:o.map(function(t){var e=t.label,n=t.key,o=(0,H.Z)(t,tk);return a.createElement(th,(0,_.Z)({tab:e,key:n,tabKey:n},o))})}),tv):a.createElement(tv,n)},tw=n(47970),tS=["key","forceRender","style","className","destroyInactiveTabPane"],tC=function(t){var e=t.id,n=t.activeKey,o=t.animated,r=t.tabPosition,i=t.destroyInactiveTabPane,l=a.useContext(K),d=l.prefixCls,s=l.tabs,u=o.tabPane,b="".concat(d,"-tabpane");return a.createElement("div",{className:c()("".concat(d,"-content-holder"))},a.createElement("div",{className:c()("".concat(d,"-content"),"".concat(d,"-content-").concat(r),(0,D.Z)({},"".concat(d,"-content-animated"),u))},s.map(function(t){var r=t.key,l=t.forceRender,d=t.style,s=t.className,g=t.destroyInactiveTabPane,f=(0,H.Z)(t,tS),p=r===n;return a.createElement(tw.ZP,(0,_.Z)({key:r,visible:p,forceRender:l,removeOnLeave:!!(i||g),leavedClassName:"".concat(b,"-hidden")},o.tabPaneMotion),function(t,n){var o=t.style,i=t.className;return a.createElement(th,(0,_.Z)({},f,{prefixCls:b,id:e,tabKey:r,animated:u,active:p,style:(0,W.Z)((0,W.Z)({},d),o),className:c()(s,i),ref:n}))})})))};n(32559);var tE=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],tO=0,t_=a.forwardRef(function(t,e){var n=t.id,o=t.prefixCls,r=void 0===o?"rc-tabs":o,i=t.className,l=t.items,d=t.direction,s=t.activeKey,u=t.defaultActiveKey,b=t.editable,g=t.animated,f=t.tabPosition,p=void 0===f?"top":f,m=t.tabBarGutter,v=t.tabBarStyle,h=t.tabBarExtraContent,y=t.locale,k=t.moreIcon,x=t.moreTransitionName,w=t.destroyInactiveTabPane,S=t.renderTabBar,C=t.onChange,E=t.onTabClick,O=t.onTabScroll,j=t.getPopupContainer,R=t.popupClassName,Z=t.indicator,T=(0,H.Z)(t,tE),N=a.useMemo(function(){return(l||[]).filter(function(t){return t&&"object"===(0,G.Z)(t)&&"key"in t})},[l]),z="rtl"===d,M=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(t=!1===e?{inkBar:!1,tabPane:!1}:!0===e?{inkBar:!0,tabPane:!1}:(0,W.Z)({inkBar:!0},"object"===(0,G.Z)(e)?e:{})).tabPaneMotion&&void 0===t.tabPane&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}(g),P=(0,a.useState)(!1),I=(0,q.Z)(P,2),L=I[0],B=I[1];(0,a.useEffect)(function(){B((0,X.Z)())},[]);var F=(0,A.Z)(function(){var t;return null===(t=N[0])||void 0===t?void 0:t.key},{value:s,defaultValue:u}),Y=(0,q.Z)(F,2),V=Y[0],Q=Y[1],$=(0,a.useState)(function(){return N.findIndex(function(t){return t.key===V})}),J=(0,q.Z)($,2),U=J[0],tt=J[1];(0,a.useEffect)(function(){var t,e=N.findIndex(function(t){return t.key===V});-1===e&&(e=Math.max(0,Math.min(U,N.length-1)),Q(null===(t=N[e])||void 0===t?void 0:t.key)),tt(e)},[N.map(function(t){return t.key}).join("_"),V,U]);var te=(0,A.Z)(null,{value:n}),tn=(0,q.Z)(te,2),ta=tn[0],to=tn[1];(0,a.useEffect)(function(){n||(to("rc-tabs-".concat(tO)),tO+=1)},[]);var tc={id:ta,activeKey:V,animated:M,tabPosition:p,rtl:z,mobile:L},tr=(0,W.Z)((0,W.Z)({},tc),{},{editable:b,locale:y,moreIcon:k,moreTransitionName:x,tabBarGutter:m,onTabClick:function(t,e){null==E||E(t,e);var n=t!==V;Q(t),n&&(null==C||C(t))},onTabScroll:O,extra:h,style:v,panes:null,getPopupContainer:j,popupClassName:R,indicator:Z});return a.createElement(K.Provider,{value:{tabs:N,prefixCls:r}},a.createElement("div",(0,_.Z)({ref:e,id:n,className:c()(r,"".concat(r,"-").concat(p),(0,D.Z)((0,D.Z)((0,D.Z)({},"".concat(r,"-mobile"),L),"".concat(r,"-editable"),b),"".concat(r,"-rtl"),z),i)},T),a.createElement(tx,(0,_.Z)({},tr,{renderTabBar:S})),a.createElement(tC,(0,_.Z)({destroyInactiveTabPane:w},tc,{animated:M}))))}),tj=n(64024),tR=n(68710);let tZ={motionAppear:!1,motionEnter:!0,motionLeave:!0};var tT=n(45287),tN=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n},tz=n(12918),tM=n(18544),tP=t=>{let{componentCls:e,motionDurationSlow:n}=t;return[{[e]:{["".concat(e,"-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,tM.oN)(t,"slide-up"),(0,tM.oN)(t,"slide-down")]]};let tI=t=>{let{componentCls:e,tabsCardPadding:n,cardBg:a,cardGutter:o,colorBorderSecondary:c,itemSelectedColor:r}=t;return{["".concat(e,"-card")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{margin:0,padding:n,background:a,border:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c),transition:"all ".concat(t.motionDurationSlow," ").concat(t.motionEaseInOut)},["".concat(e,"-tab-active")]:{color:r,background:t.colorBgContainer},["".concat(e,"-ink-bar")]:{visibility:"hidden"}},["&".concat(e,"-top, &").concat(e,"-bottom")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab + ").concat(e,"-tab")]:{marginLeft:{_skip_check_:!0,value:(0,s.bf)(o)}}}},["&".concat(e,"-top")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0")},["".concat(e,"-tab-active")]:{borderBottomColor:t.colorBgContainer}}},["&".concat(e,"-bottom")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{borderRadius:"0 0 ".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG))},["".concat(e,"-tab-active")]:{borderTopColor:t.colorBgContainer}}},["&".concat(e,"-left, &").concat(e,"-right")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab + ").concat(e,"-tab")]:{marginTop:(0,s.bf)(o)}}},["&".concat(e,"-left")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat((0,s.bf)(t.borderRadiusLG)," 0 0 ").concat((0,s.bf)(t.borderRadiusLG))}},["".concat(e,"-tab-active")]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},["&".concat(e,"-right")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0")}},["".concat(e,"-tab-active")]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},tL=t=>{let{componentCls:e,itemHoverColor:n,dropdownEdgeChildVerticalPadding:a}=t;return{["".concat(e,"-dropdown")]:Object.assign(Object.assign({},(0,tz.Wf)(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},["".concat(e,"-dropdown-menu")]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:"".concat((0,s.bf)(a)," 0"),overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":Object.assign(Object.assign({},tz.vS),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:"".concat((0,s.bf)(t.paddingXXS)," ").concat((0,s.bf)(t.paddingSM)),color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:"all ".concat(t.motionDurationSlow),"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},tB=t=>{let{componentCls:e,margin:n,colorBorderSecondary:a,horizontalMargin:o,verticalItemPadding:c,verticalItemMargin:r,calc:i}=t;return{["".concat(e,"-top, ").concat(e,"-bottom")]:{flexDirection:"column",["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{margin:o,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(a),content:"''"},["".concat(e,"-ink-bar")]:{height:t.lineWidthBold,"&-animated":{transition:"width ".concat(t.motionDurationSlow,", left ").concat(t.motionDurationSlow,",\n right ").concat(t.motionDurationSlow)}},["".concat(e,"-nav-wrap")]:{"&::before, &::after":{top:0,bottom:0,width:t.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowRight},["&".concat(e,"-nav-wrap-ping-left::before")]:{opacity:1},["&".concat(e,"-nav-wrap-ping-right::after")]:{opacity:1}}}},["".concat(e,"-top")]:{["> ".concat(e,"-nav,\n > div > ").concat(e,"-nav")]:{"&::before":{bottom:0},["".concat(e,"-ink-bar")]:{bottom:0}}},["".concat(e,"-bottom")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},["".concat(e,"-ink-bar")]:{top:0}},["> ".concat(e,"-content-holder, > div > ").concat(e,"-content-holder")]:{order:0}},["".concat(e,"-left, ").concat(e,"-right")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{flexDirection:"column",minWidth:i(t.controlHeight).mul(1.25).equal(),["".concat(e,"-tab")]:{padding:c,textAlign:"center"},["".concat(e,"-tab + ").concat(e,"-tab")]:{margin:r},["".concat(e,"-nav-wrap")]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},["&".concat(e,"-nav-wrap-ping-top::before")]:{opacity:1},["&".concat(e,"-nav-wrap-ping-bottom::after")]:{opacity:1}},["".concat(e,"-ink-bar")]:{width:t.lineWidthBold,"&-animated":{transition:"height ".concat(t.motionDurationSlow,", top ").concat(t.motionDurationSlow)}},["".concat(e,"-nav-list, ").concat(e,"-nav-operations")]:{flex:"1 0 auto",flexDirection:"column"}}},["".concat(e,"-left")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-ink-bar")]:{right:{_skip_check_:!0,value:0}}},["> ".concat(e,"-content-holder, > div > ").concat(e,"-content-holder")]:{marginLeft:{_skip_check_:!0,value:(0,s.bf)(i(t.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorder)},["> ".concat(e,"-content > ").concat(e,"-tabpane")]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},["".concat(e,"-right")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{order:1,["".concat(e,"-ink-bar")]:{left:{_skip_check_:!0,value:0}}},["> ".concat(e,"-content-holder, > div > ").concat(e,"-content-holder")]:{order:0,marginRight:{_skip_check_:!0,value:i(t.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorder)},["> ".concat(e,"-content > ").concat(e,"-tabpane")]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},tD=t=>{let{componentCls:e,cardPaddingSM:n,cardPaddingLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:c}=t;return{[e]:{"&-small":{["> ".concat(e,"-nav")]:{["".concat(e,"-tab")]:{padding:o,fontSize:t.titleFontSizeSM}}},"&-large":{["> ".concat(e,"-nav")]:{["".concat(e,"-tab")]:{padding:c,fontSize:t.titleFontSizeLG}}}},["".concat(e,"-card")]:{["&".concat(e,"-small")]:{["> ".concat(e,"-nav")]:{["".concat(e,"-tab")]:{padding:n}},["&".concat(e,"-bottom")]:{["> ".concat(e,"-nav ").concat(e,"-tab")]:{borderRadius:"0 0 ".concat((0,s.bf)(t.borderRadius)," ").concat((0,s.bf)(t.borderRadius))}},["&".concat(e,"-top")]:{["> ".concat(e,"-nav ").concat(e,"-tab")]:{borderRadius:"".concat((0,s.bf)(t.borderRadius)," ").concat((0,s.bf)(t.borderRadius)," 0 0")}},["&".concat(e,"-right")]:{["> ".concat(e,"-nav ").concat(e,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat((0,s.bf)(t.borderRadius)," ").concat((0,s.bf)(t.borderRadius)," 0")}}},["&".concat(e,"-left")]:{["> ".concat(e,"-nav ").concat(e,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat((0,s.bf)(t.borderRadius)," 0 0 ").concat((0,s.bf)(t.borderRadius))}}}},["&".concat(e,"-large")]:{["> ".concat(e,"-nav")]:{["".concat(e,"-tab")]:{padding:a}}}}}},tW=t=>{let{componentCls:e,itemActiveColor:n,itemHoverColor:a,iconCls:o,tabsHorizontalItemMargin:c,horizontalItemPadding:r,itemSelectedColor:i,itemColor:l}=t,d="".concat(e,"-tab");return{[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:r,fontSize:t.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:n}},(0,tz.Qy)(t)),"&-btn":{outline:"none",transition:"all 0.3s",["".concat(d,"-icon:not(:last-child)")]:{marginInlineEnd:t.marginSM}},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:t.calc(t.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:"all ".concat(t.motionDurationSlow),"&:hover":{color:t.colorTextHeading}},"&:hover":{color:a},["&".concat(d,"-active ").concat(d,"-btn")]:{color:i,textShadow:t.tabsActiveTextShadow},["&".concat(d,"-disabled")]:{color:t.colorTextDisabled,cursor:"not-allowed"},["&".concat(d,"-disabled ").concat(d,"-btn, &").concat(d,"-disabled ").concat(e,"-remove")]:{"&:focus, &:active":{color:t.colorTextDisabled}},["& ".concat(d,"-remove ").concat(o)]:{margin:0},["".concat(o,":not(:last-child)")]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},["".concat(d," + ").concat(d)]:{margin:{_skip_check_:!0,value:c}}}},tq=t=>{let{componentCls:e,tabsHorizontalItemMarginRTL:n,iconCls:a,cardGutter:o,calc:c}=t;return{["".concat(e,"-rtl")]:{direction:"rtl",["".concat(e,"-nav")]:{["".concat(e,"-tab")]:{margin:{_skip_check_:!0,value:n},["".concat(e,"-tab:last-of-type")]:{marginLeft:{_skip_check_:!0,value:0}},[a]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:(0,s.bf)(t.marginSM)}},["".concat(e,"-tab-remove")]:{marginRight:{_skip_check_:!0,value:(0,s.bf)(t.marginXS)},marginLeft:{_skip_check_:!0,value:(0,s.bf)(c(t.marginXXS).mul(-1).equal())},[a]:{margin:0}}}},["&".concat(e,"-left")]:{["> ".concat(e,"-nav")]:{order:1},["> ".concat(e,"-content-holder")]:{order:0}},["&".concat(e,"-right")]:{["> ".concat(e,"-nav")]:{order:0},["> ".concat(e,"-content-holder")]:{order:1}},["&".concat(e,"-card").concat(e,"-top, &").concat(e,"-card").concat(e,"-bottom")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab + ").concat(e,"-tab")]:{marginRight:{_skip_check_:!0,value:o},marginLeft:{_skip_check_:!0,value:0}}}}},["".concat(e,"-dropdown-rtl")]:{direction:"rtl"},["".concat(e,"-menu-item")]:{["".concat(e,"-dropdown-rtl")]:{textAlign:{_skip_check_:!0,value:"right"}}}}},tG=t=>{let{componentCls:e,tabsCardPadding:n,cardHeight:a,cardGutter:o,itemHoverColor:c,itemActiveColor:r,colorBorderSecondary:i}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,tz.Wf)(t)),{display:"flex",["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{position:"relative",display:"flex",flex:"none",alignItems:"center",["".concat(e,"-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(t.motionDurationSlow),content:"''",pointerEvents:"none"}},["".concat(e,"-nav-list")]:{position:"relative",display:"flex",transition:"opacity ".concat(t.motionDurationSlow)},["".concat(e,"-nav-operations")]:{display:"flex",alignSelf:"stretch"},["".concat(e,"-nav-operations-hidden")]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},["".concat(e,"-nav-more")]:{position:"relative",padding:n,background:"transparent",border:0,color:t.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.calc(t.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},["".concat(e,"-nav-add")]:Object.assign({minWidth:a,minHeight:a,marginLeft:{_skip_check_:!0,value:o},padding:"0 ".concat((0,s.bf)(t.paddingXS)),background:"transparent",border:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(i),borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0"),outline:"none",cursor:"pointer",color:t.colorText,transition:"all ".concat(t.motionDurationSlow," ").concat(t.motionEaseInOut),"&:hover":{color:c},"&:active, &:focus:not(:focus-visible)":{color:r}},(0,tz.Qy)(t))},["".concat(e,"-extra-content")]:{flex:"none"},["".concat(e,"-ink-bar")]:{position:"absolute",background:t.inkBarColor,pointerEvents:"none"}}),tW(t)),{["".concat(e,"-content")]:{position:"relative",width:"100%"},["".concat(e,"-content-holder")]:{flex:"auto",minWidth:0,minHeight:0},["".concat(e,"-tabpane")]:{outline:"none","&-hidden":{display:"none"}}}),["".concat(e,"-centered")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-nav-wrap")]:{["&:not([class*='".concat(e,"-nav-wrap-ping'])")]:{justifyContent:"center"}}}}}};var tH=(0,u.I$)("Tabs",t=>{let e=(0,b.TS)(t,{tabsCardPadding:t.cardPadding,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:"0 0 0 ".concat((0,s.bf)(t.horizontalItemGutter)),tabsHorizontalItemMarginRTL:"0 0 0 ".concat((0,s.bf)(t.horizontalItemGutter))});return[tD(e),tq(e),tB(e),tL(e),tI(e),tG(e),tP(e)]},t=>{let e=t.controlHeightLG;return{zIndexPopup:t.zIndexPopupBase+50,cardBg:t.colorFillAlter,cardHeight:e,cardPadding:"".concat((e-Math.round(t.fontSize*t.lineHeight))/2-t.lineWidth,"px ").concat(t.padding,"px"),cardPaddingSM:"".concat(1.5*t.paddingXXS,"px ").concat(t.padding,"px"),cardPaddingLG:"".concat(t.paddingXS,"px ").concat(t.padding,"px ").concat(1.5*t.paddingXXS,"px"),titleFontSize:t.fontSize,titleFontSizeLG:t.fontSizeLG,titleFontSizeSM:t.fontSize,inkBarColor:t.colorPrimary,horizontalMargin:"0 0 ".concat(t.margin,"px 0"),horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:"".concat(t.paddingSM,"px 0"),horizontalItemPaddingSM:"".concat(t.paddingXS,"px 0"),horizontalItemPaddingLG:"".concat(t.padding,"px 0"),verticalItemPadding:"".concat(t.paddingXS,"px ").concat(t.paddingLG,"px"),verticalItemMargin:"".concat(t.margin,"px 0 0 0"),itemColor:t.colorText,itemSelectedColor:t.colorPrimary,itemHoverColor:t.colorPrimaryHover,itemActiveColor:t.colorPrimaryActive,cardGutter:t.marginXXS/2}}),tA=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n};let tX=t=>{var e,n,o,r,d,s;let u;let{type:b,className:g,rootClassName:f,size:p,onEdit:m,hideAdd:v,centered:h,addIcon:y,popupClassName:k,children:x,items:w,animated:S,style:C,indicatorSize:E,indicator:O}=t,_=tA(t,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize","indicator"]),{prefixCls:j,moreIcon:R=a.createElement(L.Z,null)}=_,{direction:Z,tabs:T,getPrefixCls:N,getPopupContainer:z}=a.useContext(i.E_),M=N("tabs",j),P=(0,tj.Z)(M),[D,W,q]=tH(M,P);"editable-card"===b&&(u={onEdit:(t,e)=>{let{key:n,event:a}=e;null==m||m("add"===t?a:n,t)},removeIcon:a.createElement(I.Z,null),addIcon:y||a.createElement(B.Z,null),showAdd:!0!==v});let G=N(),H=(0,l.Z)(p),A=w||(0,tT.Z)(x).map(t=>{if(a.isValidElement(t)){let{key:e,props:n}=t,a=n||{},{tab:o}=a,c=tN(a,["tab"]);return Object.assign(Object.assign({key:String(e)},c),{label:o})}return null}).filter(t=>t),X=function(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{inkBar:!0,tabPane:!1};return(e=!1===n?{inkBar:!1,tabPane:!1}:!0===n?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},"object"==typeof n?n:{})).tabPane&&(e.tabPaneMotion=Object.assign(Object.assign({},tZ),{motionName:(0,tR.m)(t,"switch")})),e}(M,S),K=Object.assign(Object.assign({},null==T?void 0:T.style),C),F={align:null!==(e=null==O?void 0:O.align)&&void 0!==e?e:null===(n=null==T?void 0:T.indicator)||void 0===n?void 0:n.align,size:null!==(s=null!==(r=null!==(o=null==O?void 0:O.size)&&void 0!==o?o:E)&&void 0!==r?r:null===(d=null==T?void 0:T.indicator)||void 0===d?void 0:d.size)&&void 0!==s?s:null==T?void 0:T.indicatorSize};return D(a.createElement(t_,Object.assign({direction:Z,getPopupContainer:z,moreTransitionName:"".concat(G,"-slide-up")},_,{items:A,className:c()({["".concat(M,"-").concat(H)]:H,["".concat(M,"-card")]:["card","editable-card"].includes(b),["".concat(M,"-editable-card")]:"editable-card"===b,["".concat(M,"-centered")]:h},null==T?void 0:T.className,g,f,W,q,P),popupClassName:c()(k,W,q,P),style:K,editable:u,moreIcon:R,prefixCls:M,animated:X,indicator:F})))};tX.TabPane=()=>null;var tK=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n},tF=t=>{var{prefixCls:e,className:n,hoverable:o=!0}=t,r=tK(t,["prefixCls","className","hoverable"]);let{getPrefixCls:l}=a.useContext(i.E_),d=l("card",e),s=c()("".concat(d,"-grid"),n,{["".concat(d,"-grid-hoverable")]:o});return a.createElement("div",Object.assign({},r,{className:s}))};let tY=t=>{let{antCls:e,componentCls:n,headerHeight:a,cardPaddingBase:o,tabsMarginBottom:c}=t;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:"0 ".concat((0,s.bf)(o)),color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.headerFontSize,background:t.headerBg,borderBottom:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorderSecondary),borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0")},(0,tz.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},tz.vS),{["\n > ".concat(n,"-typography,\n > ").concat(n,"-typography-edit-content\n ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(e,"-tabs-top")]:{clear:"both",marginBottom:c,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,"&-bar":{borderBottom:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorderSecondary)}}})},tV=t=>{let{cardPaddingBase:e,colorBorderSecondary:n,cardShadow:a,lineWidth:o}=t;return{width:"33.33%",padding:e,border:0,borderRadius:0,boxShadow:"\n ".concat((0,s.bf)(o)," 0 0 0 ").concat(n,",\n 0 ").concat((0,s.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,s.bf)(o)," ").concat((0,s.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,s.bf)(o)," 0 0 0 ").concat(n," inset,\n 0 ").concat((0,s.bf)(o)," 0 0 ").concat(n," inset;\n "),transition:"all ".concat(t.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}},tQ=t=>{let{componentCls:e,iconCls:n,actionsLiMargin:a,cardActionsIconSize:o,colorBorderSecondary:c,actionsBg:r}=t;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:r,borderTop:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c),display:"flex",borderRadius:"0 0 ".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG))},(0,tz.dF)()),{"& > li":{margin:a,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.calc(t.cardActionsIconSize).mul(2).equal(),fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:"color ".concat(t.motionDurationMid)},["a:not(".concat(e,"-btn), > ").concat(n)]:{display:"inline-block",width:"100%",color:t.colorTextDescription,lineHeight:(0,s.bf)(t.fontHeight),transition:"color ".concat(t.motionDurationMid),"&:hover":{color:t.colorPrimary}},["> ".concat(n)]:{fontSize:o,lineHeight:(0,s.bf)(t.calc(o).mul(t.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c)}}})},t$=t=>Object.assign(Object.assign({margin:"".concat((0,s.bf)(t.calc(t.marginXXS).mul(-1).equal())," 0"),display:"flex"},(0,tz.dF)()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":Object.assign({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},tz.vS),"&-description":{color:t.colorTextDescription}}),tJ=t=>{let{componentCls:e,cardPaddingBase:n,colorFillAlter:a}=t;return{["".concat(e,"-head")]:{padding:"0 ".concat((0,s.bf)(n)),background:a,"&-title":{fontSize:t.fontSize}},["".concat(e,"-body")]:{padding:"".concat((0,s.bf)(t.padding)," ").concat((0,s.bf)(n))}}},tU=t=>{let{componentCls:e}=t;return{overflow:"hidden",["".concat(e,"-body")]:{userSelect:"none"}}},t0=t=>{let{antCls:e,componentCls:n,cardShadow:a,cardHeadPadding:o,colorBorderSecondary:c,boxShadowTertiary:r,cardPaddingBase:i,extraColor:l}=t;return{[n]:Object.assign(Object.assign({},(0,tz.Wf)(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,["&:not(".concat(n,"-bordered)")]:{boxShadow:r},["".concat(n,"-head")]:tY(t),["".concat(n,"-extra")]:{marginInlineStart:"auto",color:l,fontWeight:"normal",fontSize:t.fontSize},["".concat(n,"-body")]:Object.assign({padding:i,borderRadius:" 0 0 ".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG))},(0,tz.dF)()),["".concat(n,"-grid")]:tV(t),["".concat(n,"-cover")]:{"> *":{display:"block",width:"100%"},["img, img + ".concat(e,"-image-mask")]:{borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0")}},["".concat(n,"-actions")]:tQ(t),["".concat(n,"-meta")]:t$(t)}),["".concat(n,"-bordered")]:{border:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c),["".concat(n,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(n,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(t.motionDurationMid,", border-color ").concat(t.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:a}},["".concat(n,"-contain-grid")]:{borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0 "),["".concat(n,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(n,"-loading) ").concat(n,"-body")]:{marginBlockStart:t.calc(t.lineWidth).mul(-1).equal(),marginInlineStart:t.calc(t.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")]:tJ(t),["".concat(n,"-loading")]:tU(t),["".concat(n,"-rtl")]:{direction:"rtl"}}},t1=t=>{let{componentCls:e,cardPaddingSM:n,headerHeightSM:a,headerFontSizeSM:o}=t;return{["".concat(e,"-small")]:{["> ".concat(e,"-head")]:{minHeight:a,padding:"0 ".concat((0,s.bf)(n)),fontSize:o,["> ".concat(e,"-head-wrapper")]:{["> ".concat(e,"-extra")]:{fontSize:t.fontSize}}},["> ".concat(e,"-body")]:{padding:n}},["".concat(e,"-small").concat(e,"-contain-tabs")]:{["> ".concat(e,"-head")]:{["".concat(e,"-head-title, ").concat(e,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}};var t2=(0,u.I$)("Card",t=>{let e=(0,b.TS)(t,{cardShadow:t.boxShadowCard,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardActionsIconSize:t.fontSize,cardPaddingSM:12});return[t0(e),t1(e)]},t=>({headerBg:"transparent",headerFontSize:t.fontSizeLG,headerFontSizeSM:t.fontSize,headerHeight:t.fontSizeLG*t.lineHeightLG+2*t.padding,headerHeightSM:t.fontSize*t.lineHeight+2*t.paddingXS,actionsBg:t.colorBgContainer,actionsLiMargin:"".concat(t.paddingSM,"px 0"),tabsMarginBottom:-t.padding-t.lineWidth,extraColor:t.colorText})),t4=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n};let t5=t=>{let{prefixCls:e,actions:n=[]}=t;return a.createElement("ul",{className:"".concat(e,"-actions")},n.map((t,e)=>a.createElement("li",{style:{width:"".concat(100/n.length,"%")},key:"action-".concat(e)},a.createElement("span",null,t))))},t7=a.forwardRef((t,e)=>{let n;let{prefixCls:o,className:d,rootClassName:s,style:u,extra:b,headStyle:g={},bodyStyle:f={},title:p,loading:m,bordered:v=!0,size:h,type:y,cover:k,actions:x,tabList:w,children:S,activeTabKey:C,defaultActiveTabKey:E,tabBarExtraContent:O,hoverable:_,tabProps:j={}}=t,R=t4(t,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:Z,direction:T,card:N}=a.useContext(i.E_),z=a.useMemo(()=>{let t=!1;return a.Children.forEach(S,e=>{e&&e.type&&e.type===tF&&(t=!0)}),t},[S]),M=Z("card",o),[I,L,B]=t2(M),D=a.createElement(P,{loading:!0,active:!0,paragraph:{rows:4},title:!1},S),W=void 0!==C,q=Object.assign(Object.assign({},j),{[W?"activeKey":"defaultActiveKey"]:W?C:E,tabBarExtraContent:O}),G=(0,l.Z)(h),H=G&&"default"!==G?G:"large",A=w?a.createElement(tX,Object.assign({size:H},q,{className:"".concat(M,"-head-tabs"),onChange:e=>{var n;null===(n=t.onTabChange)||void 0===n||n.call(t,e)},items:w.map(t=>{var{tab:e}=t;return Object.assign({label:e},t4(t,["tab"]))})})):null;(p||b||A)&&(n=a.createElement("div",{className:"".concat(M,"-head"),style:g},a.createElement("div",{className:"".concat(M,"-head-wrapper")},p&&a.createElement("div",{className:"".concat(M,"-head-title")},p),b&&a.createElement("div",{className:"".concat(M,"-extra")},b)),A));let X=k?a.createElement("div",{className:"".concat(M,"-cover")},k):null,K=a.createElement("div",{className:"".concat(M,"-body"),style:f},m?D:S),F=x&&x.length?a.createElement(t5,{prefixCls:M,actions:x}):null,Y=(0,r.Z)(R,["onTabChange"]),V=c()(M,null==N?void 0:N.className,{["".concat(M,"-loading")]:m,["".concat(M,"-bordered")]:v,["".concat(M,"-hoverable")]:_,["".concat(M,"-contain-grid")]:z,["".concat(M,"-contain-tabs")]:w&&w.length,["".concat(M,"-").concat(G)]:G,["".concat(M,"-type-").concat(y)]:!!y,["".concat(M,"-rtl")]:"rtl"===T},d,s,L,B),Q=Object.assign(Object.assign({},null==N?void 0:N.style),u);return I(a.createElement("div",Object.assign({ref:e},Y,{className:V,style:Q}),n,X,K,F))});var t8=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n};t7.Grid=tF,t7.Meta=t=>{let{prefixCls:e,className:n,avatar:o,title:r,description:l}=t,d=t8(t,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=a.useContext(i.E_),u=s("card",e),b=c()("".concat(u,"-meta"),n),g=o?a.createElement("div",{className:"".concat(u,"-meta-avatar")},o):null,f=r?a.createElement("div",{className:"".concat(u,"-meta-title")},r):null,p=l?a.createElement("div",{className:"".concat(u,"-meta-description")},l):null,m=f||p?a.createElement("div",{className:"".concat(u,"-meta-detail")},f,p):null;return a.createElement("div",Object.assign({},d,{className:b}),g,m)};var t6=t7},10900:function(t,e,n){var a=n(2265);let o=a.forwardRef(function(t,e){return a.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:e},t),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.Z=o},53410:function(t,e,n){var a=n(2265);let o=a.forwardRef(function(t,e){return a.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:e},t),a.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"}))});e.Z=o}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[352],{96473:function(t,e,n){n.d(e,{Z:function(){return i}});var a=n(1119),o=n(2265),c={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"},r=n(55015),i=o.forwardRef(function(t,e){return o.createElement(r.Z,(0,a.Z)({},t,{ref:e,icon:c}))})},47323:function(t,e,n){n.d(e,{Z:function(){return p}});var a=n(5853),o=n(2265),c=n(1526),r=n(7084),i=n(97324),l=n(1153),d=n(26898);let s={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"}},u={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"}},b={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:""}},g=(t,e)=>{switch(t){case"simple":return{textColor:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,i.q)((0,l.bM)(e,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,i.q)((0,l.bM)(e,d.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:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:e?(0,i.q)((0,l.bM)(e,d.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:e?(0,l.bM)(e,d.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:e?(0,i.q)((0,l.bM)(e,d.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:e?(0,l.bM)(e,d.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:e?(0,i.q)((0,l.bM)(e,d.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},f=(0,l.fn)("Icon"),p=o.forwardRef((t,e)=>{let{icon:n,variant:d="simple",tooltip:p,size:m=r.u8.SM,color:v,className:h}=t,y=(0,a._T)(t,["icon","variant","tooltip","size","color","className"]),k=g(d,v),{tooltipProps:x,getReferenceProps:w}=(0,c.l)();return o.createElement("span",Object.assign({ref:(0,l.lq)([e,x.refs.setReference]),className:(0,i.q)(f("root"),"inline-flex flex-shrink-0 items-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,b[d].rounded,b[d].border,b[d].shadow,b[d].ring,s[m].paddingX,s[m].paddingY,h)},w,y),o.createElement(c.Z,Object.assign({text:p},x)),o.createElement(n,{className:(0,i.q)(f("icon"),"shrink-0",u[m].height,u[m].width)}))});p.displayName="Icon"},67960:function(t,e,n){n.d(e,{Z:function(){return t6}});var a=n(2265),o=n(36760),c=n.n(o),r=n(18694),i=n(71744),l=n(33759),d=t=>{let{prefixCls:e,className:n,style:o,size:r,shape:i}=t,l=c()({["".concat(e,"-lg")]:"large"===r,["".concat(e,"-sm")]:"small"===r}),d=c()({["".concat(e,"-circle")]:"circle"===i,["".concat(e,"-square")]:"square"===i,["".concat(e,"-round")]:"round"===i}),s=a.useMemo(()=>"number"==typeof r?{width:r,height:r,lineHeight:"".concat(r,"px")}:{},[r]);return a.createElement("span",{className:c()(e,l,d,n),style:Object.assign(Object.assign({},s),o)})},s=n(352),u=n(80669),b=n(3104);let g=new s.E4("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),f=t=>({height:t,lineHeight:(0,s.bf)(t)}),p=t=>Object.assign({width:t},f(t)),m=t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:g,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),v=(t,e)=>Object.assign({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},f(t)),h=t=>{let{skeletonAvatarCls:e,gradientFromColor:n,controlHeight:a,controlHeightLG:o,controlHeightSM:c}=t;return{["".concat(e)]:Object.assign({display:"inline-block",verticalAlign:"top",background:n},p(a)),["".concat(e).concat(e,"-circle")]:{borderRadius:"50%"},["".concat(e).concat(e,"-lg")]:Object.assign({},p(o)),["".concat(e).concat(e,"-sm")]:Object.assign({},p(c))}},y=t=>{let{controlHeight:e,borderRadiusSM:n,skeletonInputCls:a,controlHeightLG:o,controlHeightSM:c,gradientFromColor:r,calc:i}=t;return{["".concat(a)]:Object.assign({display:"inline-block",verticalAlign:"top",background:r,borderRadius:n},v(e,i)),["".concat(a,"-lg")]:Object.assign({},v(o,i)),["".concat(a,"-sm")]:Object.assign({},v(c,i))}},k=t=>Object.assign({width:t},f(t)),x=t=>{let{skeletonImageCls:e,imageSizeBase:n,gradientFromColor:a,borderRadiusSM:o,calc:c}=t;return{["".concat(e)]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:a,borderRadius:o},k(c(n).mul(2).equal())),{["".concat(e,"-path")]:{fill:"#bfbfbf"},["".concat(e,"-svg")]:Object.assign(Object.assign({},k(n)),{maxWidth:c(n).mul(4).equal(),maxHeight:c(n).mul(4).equal()}),["".concat(e,"-svg").concat(e,"-svg-circle")]:{borderRadius:"50%"}}),["".concat(e).concat(e,"-circle")]:{borderRadius:"50%"}}},w=(t,e,n)=>{let{skeletonButtonCls:a}=t;return{["".concat(n).concat(a,"-circle")]:{width:e,minWidth:e,borderRadius:"50%"},["".concat(n).concat(a,"-round")]:{borderRadius:e}}},S=(t,e)=>Object.assign({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},f(t)),C=t=>{let{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:a,controlHeightLG:o,controlHeightSM:c,gradientFromColor:r,calc:i}=t;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:r,borderRadius:e,width:i(a).mul(2).equal(),minWidth:i(a).mul(2).equal()},S(a,i))},w(t,a,n)),{["".concat(n,"-lg")]:Object.assign({},S(o,i))}),w(t,o,"".concat(n,"-lg"))),{["".concat(n,"-sm")]:Object.assign({},S(c,i))}),w(t,c,"".concat(n,"-sm")))},E=t=>{let{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:a,skeletonParagraphCls:o,skeletonButtonCls:c,skeletonInputCls:r,skeletonImageCls:i,controlHeight:l,controlHeightLG:d,controlHeightSM:s,gradientFromColor:u,padding:b,marginSM:g,borderRadius:f,titleHeight:v,blockRadius:k,paragraphLiHeight:w,controlHeightXS:S,paragraphMarginTop:E}=t;return{["".concat(e)]:{display:"table",width:"100%",["".concat(e,"-header")]:{display:"table-cell",paddingInlineEnd:b,verticalAlign:"top",["".concat(n)]:Object.assign({display:"inline-block",verticalAlign:"top",background:u},p(l)),["".concat(n,"-circle")]:{borderRadius:"50%"},["".concat(n,"-lg")]:Object.assign({},p(d)),["".concat(n,"-sm")]:Object.assign({},p(s))},["".concat(e,"-content")]:{display:"table-cell",width:"100%",verticalAlign:"top",["".concat(a)]:{width:"100%",height:v,background:u,borderRadius:k,["+ ".concat(o)]:{marginBlockStart:s}},["".concat(o)]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:u,borderRadius:k,"+ li":{marginBlockStart:S}}},["".concat(o,"> li:last-child:not(:first-child):not(:nth-child(2))")]:{width:"61%"}},["&-round ".concat(e,"-content")]:{["".concat(a,", ").concat(o," > li")]:{borderRadius:f}}},["".concat(e,"-with-avatar ").concat(e,"-content")]:{["".concat(a)]:{marginBlockStart:g,["+ ".concat(o)]:{marginBlockStart:E}}},["".concat(e).concat(e,"-element")]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},C(t)),h(t)),y(t)),x(t)),["".concat(e).concat(e,"-block")]:{width:"100%",["".concat(c)]:{width:"100%"},["".concat(r)]:{width:"100%"}},["".concat(e).concat(e,"-active")]:{["\n ".concat(a,",\n ").concat(o," > li,\n ").concat(n,",\n ").concat(c,",\n ").concat(r,",\n ").concat(i,"\n ")]:Object.assign({},m(t))}}};var O=(0,u.I$)("Skeleton",t=>{let{componentCls:e,calc:n}=t;return[E((0,b.TS)(t,{skeletonAvatarCls:"".concat(e,"-avatar"),skeletonTitleCls:"".concat(e,"-title"),skeletonParagraphCls:"".concat(e,"-paragraph"),skeletonButtonCls:"".concat(e,"-button"),skeletonInputCls:"".concat(e,"-input"),skeletonImageCls:"".concat(e,"-image"),imageSizeBase:n(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:"linear-gradient(90deg, ".concat(t.gradientFromColor," 25%, ").concat(t.gradientToColor," 37%, ").concat(t.gradientFromColor," 63%)"),skeletonLoadingMotionDuration:"1.4s"}))]},t=>{let{colorFillContent:e,colorFill:n}=t;return{color:e,colorGradientEnd:n,gradientFromColor:e,gradientToColor:n,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),_=n(1119),j={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"},R=n(55015),Z=a.forwardRef(function(t,e){return a.createElement(R.Z,(0,_.Z)({},t,{ref:e,icon:j}))}),T=n(83145),N=t=>{let e=e=>{let{width:n,rows:a=2}=t;return Array.isArray(n)?n[e]:a-1===e?n:void 0},{prefixCls:n,className:o,style:r,rows:i}=t,l=(0,T.Z)(Array(i)).map((t,n)=>a.createElement("li",{key:n,style:{width:e(n)}}));return a.createElement("ul",{className:c()(n,o),style:r},l)},z=t=>{let{prefixCls:e,className:n,width:o,style:r}=t;return a.createElement("h3",{className:c()(e,n),style:Object.assign({width:o},r)})};function M(t){return t&&"object"==typeof t?t:{}}let P=t=>{let{prefixCls:e,loading:n,className:o,rootClassName:r,style:l,children:s,avatar:u=!1,title:b=!0,paragraph:g=!0,active:f,round:p}=t,{getPrefixCls:m,direction:v,skeleton:h}=a.useContext(i.E_),y=m("skeleton",e),[k,x,w]=O(y);if(n||!("loading"in t)){let t,e;let n=!!u,i=!!b,s=!!g;if(n){let e=Object.assign(Object.assign({prefixCls:"".concat(y,"-avatar")},i&&!s?{size:"large",shape:"square"}:{size:"large",shape:"circle"}),M(u));t=a.createElement("div",{className:"".concat(y,"-header")},a.createElement(d,Object.assign({},e)))}if(i||s){let t,o;if(i){let e=Object.assign(Object.assign({prefixCls:"".concat(y,"-title")},!n&&s?{width:"38%"}:n&&s?{width:"50%"}:{}),M(b));t=a.createElement(z,Object.assign({},e))}if(s){let t=Object.assign(Object.assign({prefixCls:"".concat(y,"-paragraph")},function(t,e){let n={};return t&&e||(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}(n,i)),M(g));o=a.createElement(N,Object.assign({},t))}e=a.createElement("div",{className:"".concat(y,"-content")},t,o)}let m=c()(y,{["".concat(y,"-with-avatar")]:n,["".concat(y,"-active")]:f,["".concat(y,"-rtl")]:"rtl"===v,["".concat(y,"-round")]:p},null==h?void 0:h.className,o,r,x,w);return k(a.createElement("div",{className:m,style:Object.assign(Object.assign({},null==h?void 0:h.style),l)},t,e))}return void 0!==s?s:null};P.Button=t=>{let{prefixCls:e,className:n,rootClassName:o,active:l,block:s=!1,size:u="default"}=t,{getPrefixCls:b}=a.useContext(i.E_),g=b("skeleton",e),[f,p,m]=O(g),v=(0,r.Z)(t,["prefixCls"]),h=c()(g,"".concat(g,"-element"),{["".concat(g,"-active")]:l,["".concat(g,"-block")]:s},n,o,p,m);return f(a.createElement("div",{className:h},a.createElement(d,Object.assign({prefixCls:"".concat(g,"-button"),size:u},v))))},P.Avatar=t=>{let{prefixCls:e,className:n,rootClassName:o,active:l,shape:s="circle",size:u="default"}=t,{getPrefixCls:b}=a.useContext(i.E_),g=b("skeleton",e),[f,p,m]=O(g),v=(0,r.Z)(t,["prefixCls","className"]),h=c()(g,"".concat(g,"-element"),{["".concat(g,"-active")]:l},n,o,p,m);return f(a.createElement("div",{className:h},a.createElement(d,Object.assign({prefixCls:"".concat(g,"-avatar"),shape:s,size:u},v))))},P.Input=t=>{let{prefixCls:e,className:n,rootClassName:o,active:l,block:s,size:u="default"}=t,{getPrefixCls:b}=a.useContext(i.E_),g=b("skeleton",e),[f,p,m]=O(g),v=(0,r.Z)(t,["prefixCls"]),h=c()(g,"".concat(g,"-element"),{["".concat(g,"-active")]:l,["".concat(g,"-block")]:s},n,o,p,m);return f(a.createElement("div",{className:h},a.createElement(d,Object.assign({prefixCls:"".concat(g,"-input"),size:u},v))))},P.Image=t=>{let{prefixCls:e,className:n,rootClassName:o,style:r,active:l}=t,{getPrefixCls:d}=a.useContext(i.E_),s=d("skeleton",e),[u,b,g]=O(s),f=c()(s,"".concat(s,"-element"),{["".concat(s,"-active")]:l},n,o,b,g);return u(a.createElement("div",{className:f},a.createElement("div",{className:c()("".concat(s,"-image"),n),style:r},a.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:"".concat(s,"-image-svg")},a.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(s,"-image-path")})))))},P.Node=t=>{let{prefixCls:e,className:n,rootClassName:o,style:r,active:l,children:d}=t,{getPrefixCls:s}=a.useContext(i.E_),u=s("skeleton",e),[b,g,f]=O(u),p=c()(u,"".concat(u,"-element"),{["".concat(u,"-active")]:l},g,n,o,f),m=null!=d?d:a.createElement(Z,null);return b(a.createElement("div",{className:p},a.createElement("div",{className:c()("".concat(u,"-image"),n),style:r},m)))};var I=n(49638),L=n(39760),B=n(96473),D=n(11993),W=n(31686),q=n(26365),G=n(41154),H=n(6989),A=n(50506),X=n(79267),K=(0,a.createContext)(null),F=n(31474),Y=n(58525),V=n(28791),Q=n(53346),$=function(t){var e=t.activeTabOffset,n=t.horizontal,o=t.rtl,c=t.indicator,r=void 0===c?{}:c,i=r.size,l=r.align,d=void 0===l?"center":l,s=(0,a.useState)(),u=(0,q.Z)(s,2),b=u[0],g=u[1],f=(0,a.useRef)(),p=a.useCallback(function(t){return"function"==typeof i?i(t):"number"==typeof i?i:t},[i]);function m(){Q.Z.cancel(f.current)}return(0,a.useEffect)(function(){var t={};if(e){if(n){t.width=p(e.width);var a=o?"right":"left";"start"===d&&(t[a]=e[a]),"center"===d&&(t[a]=e[a]+e.width/2,t.transform=o?"translateX(50%)":"translateX(-50%)"),"end"===d&&(t[a]=e[a]+e.width,t.transform="translateX(-100%)")}else t.height=p(e.height),"start"===d&&(t.top=e.top),"center"===d&&(t.top=e.top+e.height/2,t.transform="translateY(-50%)"),"end"===d&&(t.top=e.top+e.height,t.transform="translateY(-100%)")}return m(),f.current=(0,Q.Z)(function(){g(t)}),m},[e,n,o,d,p]),{style:b}},J={width:0,height:0,left:0,top:0};function U(t,e){var n=a.useRef(t),o=a.useState({}),c=(0,q.Z)(o,2)[1];return[n.current,function(t){var a="function"==typeof t?t(n.current):t;a!==n.current&&e(a,n.current),n.current=a,c({})}]}var tt=n(27380);function te(t){var e=(0,a.useState)(0),n=(0,q.Z)(e,2),o=n[0],c=n[1],r=(0,a.useRef)(0),i=(0,a.useRef)();return i.current=t,(0,tt.o)(function(){var t;null===(t=i.current)||void 0===t||t.call(i)},[o]),function(){r.current===o&&(r.current+=1,c(r.current))}}var tn={width:0,height:0,left:0,top:0,right:0};function ta(t){var e;return t instanceof Map?(e={},t.forEach(function(t,n){e[n]=t})):e=t,JSON.stringify(e)}function to(t){return String(t).replace(/"/g,"TABS_DQ")}function tc(t,e,n,a){return!!n&&!a&&!1!==t&&(void 0!==t||!1!==e&&null!==e)}var tr=a.forwardRef(function(t,e){var n=t.prefixCls,o=t.editable,c=t.locale,r=t.style;return o&&!1!==o.showAdd?a.createElement("button",{ref:e,type:"button",className:"".concat(n,"-nav-add"),style:r,"aria-label":(null==c?void 0:c.addAriaLabel)||"Add tab",onClick:function(t){o.onEdit("add",{event:t})}},o.addIcon||"+"):null}),ti=a.forwardRef(function(t,e){var n,o=t.position,c=t.prefixCls,r=t.extra;if(!r)return null;var i={};return"object"!==(0,G.Z)(r)||a.isValidElement(r)?i.right=r:i=r,"right"===o&&(n=i.right),"left"===o&&(n=i.left),n?a.createElement("div",{className:"".concat(c,"-extra-content"),ref:e},n):null}),tl=n(71030),td=n(33082),ts=n(95814),tu=a.forwardRef(function(t,e){var n=t.prefixCls,o=t.id,r=t.tabs,i=t.locale,l=t.mobile,d=t.moreIcon,s=t.moreTransitionName,u=t.style,b=t.className,g=t.editable,f=t.tabBarGutter,p=t.rtl,m=t.removeAriaLabel,v=t.onTabClick,h=t.getPopupContainer,y=t.popupClassName,k=(0,a.useState)(!1),x=(0,q.Z)(k,2),w=x[0],S=x[1],C=(0,a.useState)(null),E=(0,q.Z)(C,2),O=E[0],_=E[1],j="".concat(o,"-more-popup"),R="".concat(n,"-dropdown"),Z=null!==O?"".concat(j,"-").concat(O):null,T=null==i?void 0:i.dropdownAriaLabel,N=a.createElement(td.ZP,{onClick:function(t){v(t.key,t.domEvent),S(!1)},prefixCls:"".concat(R,"-menu"),id:j,tabIndex:-1,role:"listbox","aria-activedescendant":Z,selectedKeys:[O],"aria-label":void 0!==T?T:"expanded dropdown"},r.map(function(t){var e=t.closable,n=t.disabled,c=t.closeIcon,r=t.key,i=t.label,l=tc(e,c,g,n);return a.createElement(td.sN,{key:r,id:"".concat(j,"-").concat(r),role:"option","aria-controls":o&&"".concat(o,"-panel-").concat(r),disabled:n},a.createElement("span",null,i),l&&a.createElement("button",{type:"button","aria-label":m||"remove",tabIndex:0,className:"".concat(R,"-menu-item-remove"),onClick:function(t){t.stopPropagation(),t.preventDefault(),t.stopPropagation(),g.onEdit("remove",{key:r,event:t})}},c||g.removeIcon||"\xd7"))}));function z(t){for(var e=r.filter(function(t){return!t.disabled}),n=e.findIndex(function(t){return t.key===O})||0,a=e.length,o=0;oMath.abs(i-n)?[i,l,d-e.x,s-e.y]:[n,a,c,o]},tp=function(t){var e=t.current||{},n=e.offsetWidth,a=void 0===n?0:n,o=e.offsetHeight;if(t.current){var c=t.current.getBoundingClientRect(),r=c.width,i=c.height;if(1>Math.abs(r-a))return[r,i]}return[a,void 0===o?0:o]},tm=function(t,e){return t[e?0:1]},tv=a.forwardRef(function(t,e){var n,o,r,i,l,d,s,u,b,g,f,p,m,v,h,y,k,x,w,S,C,E,O,j,R,Z,N,z,M,P,I,L,B,G,H,A,X,Q,tt,tc=t.className,tl=t.style,td=t.id,ts=t.animated,tu=t.activeKey,tv=t.rtl,th=t.extra,ty=t.editable,tk=t.locale,tx=t.tabPosition,tw=t.tabBarGutter,tS=t.children,tC=t.onTabClick,tE=t.onTabScroll,tO=t.indicator,t_=a.useContext(K),tj=t_.prefixCls,tR=t_.tabs,tZ=(0,a.useRef)(null),tT=(0,a.useRef)(null),tN=(0,a.useRef)(null),tz=(0,a.useRef)(null),tM=(0,a.useRef)(null),tP=(0,a.useRef)(null),tI=(0,a.useRef)(null),tL="top"===tx||"bottom"===tx,tB=U(0,function(t,e){tL&&tE&&tE({direction:t>e?"left":"right"})}),tD=(0,q.Z)(tB,2),tW=tD[0],tq=tD[1],tG=U(0,function(t,e){!tL&&tE&&tE({direction:t>e?"top":"bottom"})}),tH=(0,q.Z)(tG,2),tA=tH[0],tX=tH[1],tK=(0,a.useState)([0,0]),tF=(0,q.Z)(tK,2),tY=tF[0],tV=tF[1],tQ=(0,a.useState)([0,0]),t$=(0,q.Z)(tQ,2),tJ=t$[0],tU=t$[1],t0=(0,a.useState)([0,0]),t1=(0,q.Z)(t0,2),t2=t1[0],t4=t1[1],t5=(0,a.useState)([0,0]),t7=(0,q.Z)(t5,2),t8=t7[0],t6=t7[1],t3=(n=new Map,o=(0,a.useRef)([]),r=(0,a.useState)({}),i=(0,q.Z)(r,2)[1],l=(0,a.useRef)("function"==typeof n?n():n),d=te(function(){var t=l.current;o.current.forEach(function(e){t=e(t)}),o.current=[],l.current=t,i({})}),[l.current,function(t){o.current.push(t),d()}]),t9=(0,q.Z)(t3,2),et=t9[0],ee=t9[1],en=(s=tJ[0],(0,a.useMemo)(function(){for(var t=new Map,e=et.get(null===(o=tR[0])||void 0===o?void 0:o.key)||J,n=e.left+e.width,a=0;aeu?eu:t}tL&&tv?(es=0,eu=Math.max(0,eo-el)):(es=Math.min(0,el-eo),eu=0);var eg=(0,a.useRef)(null),ef=(0,a.useState)(),ep=(0,q.Z)(ef,2),em=ep[0],ev=ep[1];function eh(){ev(Date.now())}function ey(){eg.current&&clearTimeout(eg.current)}u=function(t,e){function n(t,e){t(function(t){return eb(t+e)})}return!!ei&&(tL?n(tq,t):n(tX,e),ey(),eh(),!0)},b=(0,a.useState)(),f=(g=(0,q.Z)(b,2))[0],p=g[1],m=(0,a.useState)(0),h=(v=(0,q.Z)(m,2))[0],y=v[1],k=(0,a.useState)(0),w=(x=(0,q.Z)(k,2))[0],S=x[1],C=(0,a.useState)(),O=(E=(0,q.Z)(C,2))[0],j=E[1],R=(0,a.useRef)(),Z=(0,a.useRef)(),(N=(0,a.useRef)(null)).current={onTouchStart:function(t){var e=t.touches[0];p({x:e.screenX,y:e.screenY}),window.clearInterval(R.current)},onTouchMove:function(t){if(f){t.preventDefault();var e=t.touches[0],n=e.screenX,a=e.screenY;p({x:n,y:a});var o=n-f.x,c=a-f.y;u(o,c);var r=Date.now();y(r),S(r-h),j({x:o,y:c})}},onTouchEnd:function(){if(f&&(p(null),j(null),O)){var t=O.x/w,e=O.y/w;if(!(.1>Math.max(Math.abs(t),Math.abs(e)))){var n=t,a=e;R.current=window.setInterval(function(){if(.01>Math.abs(n)&&.01>Math.abs(a)){window.clearInterval(R.current);return}n*=.9046104802746175,a*=.9046104802746175,u(20*n,20*a)},20)}}},onWheel:function(t){var e=t.deltaX,n=t.deltaY,a=0,o=Math.abs(e),c=Math.abs(n);o===c?a="x"===Z.current?e:n:o>c?(a=e,Z.current="x"):(a=n,Z.current="y"),u(-a,-a)&&t.preventDefault()}},a.useEffect(function(){function t(t){N.current.onTouchMove(t)}function e(t){N.current.onTouchEnd(t)}return document.addEventListener("touchmove",t,{passive:!1}),document.addEventListener("touchend",e,{passive:!1}),tz.current.addEventListener("touchstart",function(t){N.current.onTouchStart(t)},{passive:!1}),tz.current.addEventListener("wheel",function(t){N.current.onWheel(t)}),function(){document.removeEventListener("touchmove",t),document.removeEventListener("touchend",e)}},[]),(0,a.useEffect)(function(){return ey(),em&&(eg.current=setTimeout(function(){ev(0)},100)),ey},[em]);var ek=(z=tL?tW:tA,B=(M=(0,W.Z)((0,W.Z)({},t),{},{tabs:tR})).tabs,G=M.tabPosition,H=M.rtl,["top","bottom"].includes(G)?(P="width",I=H?"right":"left",L=Math.abs(z)):(P="height",I="top",L=-z),(0,a.useMemo)(function(){if(!B.length)return[0,0];for(var t=B.length,e=t,n=0;nL+el){e=n-1;break}}for(var o=0,c=t-1;c>=0;c-=1)if((en.get(B[c].key)||tn)[I]=e?[0,0]:[o,e]},[en,el,eo,ec,er,L,G,B.map(function(t){return t.key}).join("_"),H])),ex=(0,q.Z)(ek,2),ew=ex[0],eS=ex[1],eC=(0,Y.Z)(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tu,e=en.get(t)||{width:0,height:0,left:0,right:0,top:0};if(tL){var n=tW;tv?e.righttW+el&&(n=e.right+e.width-el):e.left<-tW?n=-e.left:e.left+e.width>-tW+el&&(n=-(e.left+e.width-el)),tX(0),tq(eb(n))}else{var a=tA;e.top<-tA?a=-e.top:e.top+e.height>-tA+el&&(a=-(e.top+e.height-el)),tq(0),tX(eb(a))}}),eE={};"top"===tx||"bottom"===tx?eE[tv?"marginRight":"marginLeft"]=tw:eE.marginTop=tw;var eO=tR.map(function(t,e){var n=t.key;return a.createElement(tg,{id:td,prefixCls:tj,key:n,tab:t,style:0===e?void 0:eE,closable:t.closable,editable:ty,active:n===tu,renderWrapper:tS,removeAriaLabel:null==tk?void 0:tk.removeAriaLabel,onClick:function(t){tC(n,t)},onFocus:function(){eC(n),eh(),tz.current&&(tv||(tz.current.scrollLeft=0),tz.current.scrollTop=0)}})}),e_=function(){return ee(function(){var t,e=new Map,n=null===(t=tM.current)||void 0===t?void 0:t.getBoundingClientRect();return tR.forEach(function(t){var a,o=t.key,c=null===(a=tM.current)||void 0===a?void 0:a.querySelector('[data-node-key="'.concat(to(o),'"]'));if(c){var r=tf(c,n),i=(0,q.Z)(r,4),l=i[0],d=i[1],s=i[2],u=i[3];e.set(o,{width:l,height:d,left:s,top:u})}}),e})};(0,a.useEffect)(function(){e_()},[tR.map(function(t){return t.key}).join("_")]);var ej=te(function(){var t=tp(tZ),e=tp(tT),n=tp(tN);tV([t[0]-e[0]-n[0],t[1]-e[1]-n[1]]);var a=tp(tI);t4(a),t6(tp(tP));var o=tp(tM);tU([o[0]-a[0],o[1]-a[1]]),e_()}),eR=tR.slice(0,ew),eZ=tR.slice(eS+1),eT=[].concat((0,T.Z)(eR),(0,T.Z)(eZ)),eN=en.get(tu),ez=$({activeTabOffset:eN,horizontal:tL,indicator:tO,rtl:tv}).style;(0,a.useEffect)(function(){eC()},[tu,es,eu,ta(eN),ta(en),tL]),(0,a.useEffect)(function(){ej()},[tv]);var eM=!!eT.length,eP="".concat(tj,"-nav-wrap");return tL?tv?(X=tW>0,A=tW!==eu):(A=tW<0,X=tW!==es):(Q=tA<0,tt=tA!==es),a.createElement(F.Z,{onResize:ej},a.createElement("div",{ref:(0,V.x1)(e,tZ),role:"tablist",className:c()("".concat(tj,"-nav"),tc),style:tl,onKeyDown:function(){eh()}},a.createElement(ti,{ref:tT,position:"left",extra:th,prefixCls:tj}),a.createElement(F.Z,{onResize:ej},a.createElement("div",{className:c()(eP,(0,D.Z)((0,D.Z)((0,D.Z)((0,D.Z)({},"".concat(eP,"-ping-left"),A),"".concat(eP,"-ping-right"),X),"".concat(eP,"-ping-top"),Q),"".concat(eP,"-ping-bottom"),tt)),ref:tz},a.createElement(F.Z,{onResize:ej},a.createElement("div",{ref:tM,className:"".concat(tj,"-nav-list"),style:{transform:"translate(".concat(tW,"px, ").concat(tA,"px)"),transition:em?"none":void 0}},eO,a.createElement(tr,{ref:tI,prefixCls:tj,locale:tk,editable:ty,style:(0,W.Z)((0,W.Z)({},0===eO.length?void 0:eE),{},{visibility:eM?"hidden":null})}),a.createElement("div",{className:c()("".concat(tj,"-ink-bar"),(0,D.Z)({},"".concat(tj,"-ink-bar-animated"),ts.inkBar)),style:ez}))))),a.createElement(tb,(0,_.Z)({},t,{removeAriaLabel:null==tk?void 0:tk.removeAriaLabel,ref:tP,prefixCls:tj,tabs:eT,className:!eM&&ed,tabMoving:!!em})),a.createElement(ti,{ref:tN,position:"right",extra:th,prefixCls:tj})))}),th=a.forwardRef(function(t,e){var n=t.prefixCls,o=t.className,r=t.style,i=t.id,l=t.active,d=t.tabKey,s=t.children;return a.createElement("div",{id:i&&"".concat(i,"-panel-").concat(d),role:"tabpanel",tabIndex:l?0:-1,"aria-labelledby":i&&"".concat(i,"-tab-").concat(d),"aria-hidden":!l,style:r,className:c()(n,l&&"".concat(n,"-active"),o),ref:e},s)}),ty=["renderTabBar"],tk=["label","key"],tx=function(t){var e=t.renderTabBar,n=(0,H.Z)(t,ty),o=a.useContext(K).tabs;return e?e((0,W.Z)((0,W.Z)({},n),{},{panes:o.map(function(t){var e=t.label,n=t.key,o=(0,H.Z)(t,tk);return a.createElement(th,(0,_.Z)({tab:e,key:n,tabKey:n},o))})}),tv):a.createElement(tv,n)},tw=n(47970),tS=["key","forceRender","style","className","destroyInactiveTabPane"],tC=function(t){var e=t.id,n=t.activeKey,o=t.animated,r=t.tabPosition,i=t.destroyInactiveTabPane,l=a.useContext(K),d=l.prefixCls,s=l.tabs,u=o.tabPane,b="".concat(d,"-tabpane");return a.createElement("div",{className:c()("".concat(d,"-content-holder"))},a.createElement("div",{className:c()("".concat(d,"-content"),"".concat(d,"-content-").concat(r),(0,D.Z)({},"".concat(d,"-content-animated"),u))},s.map(function(t){var r=t.key,l=t.forceRender,d=t.style,s=t.className,g=t.destroyInactiveTabPane,f=(0,H.Z)(t,tS),p=r===n;return a.createElement(tw.ZP,(0,_.Z)({key:r,visible:p,forceRender:l,removeOnLeave:!!(i||g),leavedClassName:"".concat(b,"-hidden")},o.tabPaneMotion),function(t,n){var o=t.style,i=t.className;return a.createElement(th,(0,_.Z)({},f,{prefixCls:b,id:e,tabKey:r,animated:u,active:p,style:(0,W.Z)((0,W.Z)({},d),o),className:c()(s,i),ref:n}))})})))};n(32559);var tE=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],tO=0,t_=a.forwardRef(function(t,e){var n=t.id,o=t.prefixCls,r=void 0===o?"rc-tabs":o,i=t.className,l=t.items,d=t.direction,s=t.activeKey,u=t.defaultActiveKey,b=t.editable,g=t.animated,f=t.tabPosition,p=void 0===f?"top":f,m=t.tabBarGutter,v=t.tabBarStyle,h=t.tabBarExtraContent,y=t.locale,k=t.moreIcon,x=t.moreTransitionName,w=t.destroyInactiveTabPane,S=t.renderTabBar,C=t.onChange,E=t.onTabClick,O=t.onTabScroll,j=t.getPopupContainer,R=t.popupClassName,Z=t.indicator,T=(0,H.Z)(t,tE),N=a.useMemo(function(){return(l||[]).filter(function(t){return t&&"object"===(0,G.Z)(t)&&"key"in t})},[l]),z="rtl"===d,M=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{inkBar:!0,tabPane:!1};return(t=!1===e?{inkBar:!1,tabPane:!1}:!0===e?{inkBar:!0,tabPane:!1}:(0,W.Z)({inkBar:!0},"object"===(0,G.Z)(e)?e:{})).tabPaneMotion&&void 0===t.tabPane&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}(g),P=(0,a.useState)(!1),I=(0,q.Z)(P,2),L=I[0],B=I[1];(0,a.useEffect)(function(){B((0,X.Z)())},[]);var F=(0,A.Z)(function(){var t;return null===(t=N[0])||void 0===t?void 0:t.key},{value:s,defaultValue:u}),Y=(0,q.Z)(F,2),V=Y[0],Q=Y[1],$=(0,a.useState)(function(){return N.findIndex(function(t){return t.key===V})}),J=(0,q.Z)($,2),U=J[0],tt=J[1];(0,a.useEffect)(function(){var t,e=N.findIndex(function(t){return t.key===V});-1===e&&(e=Math.max(0,Math.min(U,N.length-1)),Q(null===(t=N[e])||void 0===t?void 0:t.key)),tt(e)},[N.map(function(t){return t.key}).join("_"),V,U]);var te=(0,A.Z)(null,{value:n}),tn=(0,q.Z)(te,2),ta=tn[0],to=tn[1];(0,a.useEffect)(function(){n||(to("rc-tabs-".concat(tO)),tO+=1)},[]);var tc={id:ta,activeKey:V,animated:M,tabPosition:p,rtl:z,mobile:L},tr=(0,W.Z)((0,W.Z)({},tc),{},{editable:b,locale:y,moreIcon:k,moreTransitionName:x,tabBarGutter:m,onTabClick:function(t,e){null==E||E(t,e);var n=t!==V;Q(t),n&&(null==C||C(t))},onTabScroll:O,extra:h,style:v,panes:null,getPopupContainer:j,popupClassName:R,indicator:Z});return a.createElement(K.Provider,{value:{tabs:N,prefixCls:r}},a.createElement("div",(0,_.Z)({ref:e,id:n,className:c()(r,"".concat(r,"-").concat(p),(0,D.Z)((0,D.Z)((0,D.Z)({},"".concat(r,"-mobile"),L),"".concat(r,"-editable"),b),"".concat(r,"-rtl"),z),i)},T),a.createElement(tx,(0,_.Z)({},tr,{renderTabBar:S})),a.createElement(tC,(0,_.Z)({destroyInactiveTabPane:w},tc,{animated:M}))))}),tj=n(64024),tR=n(68710);let tZ={motionAppear:!1,motionEnter:!0,motionLeave:!0};var tT=n(45287),tN=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n},tz=n(12918),tM=n(18544),tP=t=>{let{componentCls:e,motionDurationSlow:n}=t;return[{[e]:{["".concat(e,"-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,tM.oN)(t,"slide-up"),(0,tM.oN)(t,"slide-down")]]};let tI=t=>{let{componentCls:e,tabsCardPadding:n,cardBg:a,cardGutter:o,colorBorderSecondary:c,itemSelectedColor:r}=t;return{["".concat(e,"-card")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{margin:0,padding:n,background:a,border:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c),transition:"all ".concat(t.motionDurationSlow," ").concat(t.motionEaseInOut)},["".concat(e,"-tab-active")]:{color:r,background:t.colorBgContainer},["".concat(e,"-ink-bar")]:{visibility:"hidden"}},["&".concat(e,"-top, &").concat(e,"-bottom")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab + ").concat(e,"-tab")]:{marginLeft:{_skip_check_:!0,value:(0,s.bf)(o)}}}},["&".concat(e,"-top")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0")},["".concat(e,"-tab-active")]:{borderBottomColor:t.colorBgContainer}}},["&".concat(e,"-bottom")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{borderRadius:"0 0 ".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG))},["".concat(e,"-tab-active")]:{borderTopColor:t.colorBgContainer}}},["&".concat(e,"-left, &").concat(e,"-right")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab + ").concat(e,"-tab")]:{marginTop:(0,s.bf)(o)}}},["&".concat(e,"-left")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat((0,s.bf)(t.borderRadiusLG)," 0 0 ").concat((0,s.bf)(t.borderRadiusLG))}},["".concat(e,"-tab-active")]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},["&".concat(e,"-right")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0")}},["".concat(e,"-tab-active")]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},tL=t=>{let{componentCls:e,itemHoverColor:n,dropdownEdgeChildVerticalPadding:a}=t;return{["".concat(e,"-dropdown")]:Object.assign(Object.assign({},(0,tz.Wf)(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},["".concat(e,"-dropdown-menu")]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:"".concat((0,s.bf)(a)," 0"),overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":Object.assign(Object.assign({},tz.vS),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:"".concat((0,s.bf)(t.paddingXXS)," ").concat((0,s.bf)(t.paddingSM)),color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:"all ".concat(t.motionDurationSlow),"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},tB=t=>{let{componentCls:e,margin:n,colorBorderSecondary:a,horizontalMargin:o,verticalItemPadding:c,verticalItemMargin:r,calc:i}=t;return{["".concat(e,"-top, ").concat(e,"-bottom")]:{flexDirection:"column",["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{margin:o,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(a),content:"''"},["".concat(e,"-ink-bar")]:{height:t.lineWidthBold,"&-animated":{transition:"width ".concat(t.motionDurationSlow,", left ").concat(t.motionDurationSlow,",\n right ").concat(t.motionDurationSlow)}},["".concat(e,"-nav-wrap")]:{"&::before, &::after":{top:0,bottom:0,width:t.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowRight},["&".concat(e,"-nav-wrap-ping-left::before")]:{opacity:1},["&".concat(e,"-nav-wrap-ping-right::after")]:{opacity:1}}}},["".concat(e,"-top")]:{["> ".concat(e,"-nav,\n > div > ").concat(e,"-nav")]:{"&::before":{bottom:0},["".concat(e,"-ink-bar")]:{bottom:0}}},["".concat(e,"-bottom")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},["".concat(e,"-ink-bar")]:{top:0}},["> ".concat(e,"-content-holder, > div > ").concat(e,"-content-holder")]:{order:0}},["".concat(e,"-left, ").concat(e,"-right")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{flexDirection:"column",minWidth:i(t.controlHeight).mul(1.25).equal(),["".concat(e,"-tab")]:{padding:c,textAlign:"center"},["".concat(e,"-tab + ").concat(e,"-tab")]:{margin:r},["".concat(e,"-nav-wrap")]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},["&".concat(e,"-nav-wrap-ping-top::before")]:{opacity:1},["&".concat(e,"-nav-wrap-ping-bottom::after")]:{opacity:1}},["".concat(e,"-ink-bar")]:{width:t.lineWidthBold,"&-animated":{transition:"height ".concat(t.motionDurationSlow,", top ").concat(t.motionDurationSlow)}},["".concat(e,"-nav-list, ").concat(e,"-nav-operations")]:{flex:"1 0 auto",flexDirection:"column"}}},["".concat(e,"-left")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-ink-bar")]:{right:{_skip_check_:!0,value:0}}},["> ".concat(e,"-content-holder, > div > ").concat(e,"-content-holder")]:{marginLeft:{_skip_check_:!0,value:(0,s.bf)(i(t.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorder)},["> ".concat(e,"-content > ").concat(e,"-tabpane")]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},["".concat(e,"-right")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{order:1,["".concat(e,"-ink-bar")]:{left:{_skip_check_:!0,value:0}}},["> ".concat(e,"-content-holder, > div > ").concat(e,"-content-holder")]:{order:0,marginRight:{_skip_check_:!0,value:i(t.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorder)},["> ".concat(e,"-content > ").concat(e,"-tabpane")]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},tD=t=>{let{componentCls:e,cardPaddingSM:n,cardPaddingLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:c}=t;return{[e]:{"&-small":{["> ".concat(e,"-nav")]:{["".concat(e,"-tab")]:{padding:o,fontSize:t.titleFontSizeSM}}},"&-large":{["> ".concat(e,"-nav")]:{["".concat(e,"-tab")]:{padding:c,fontSize:t.titleFontSizeLG}}}},["".concat(e,"-card")]:{["&".concat(e,"-small")]:{["> ".concat(e,"-nav")]:{["".concat(e,"-tab")]:{padding:n}},["&".concat(e,"-bottom")]:{["> ".concat(e,"-nav ").concat(e,"-tab")]:{borderRadius:"0 0 ".concat((0,s.bf)(t.borderRadius)," ").concat((0,s.bf)(t.borderRadius))}},["&".concat(e,"-top")]:{["> ".concat(e,"-nav ").concat(e,"-tab")]:{borderRadius:"".concat((0,s.bf)(t.borderRadius)," ").concat((0,s.bf)(t.borderRadius)," 0 0")}},["&".concat(e,"-right")]:{["> ".concat(e,"-nav ").concat(e,"-tab")]:{borderRadius:{_skip_check_:!0,value:"0 ".concat((0,s.bf)(t.borderRadius)," ").concat((0,s.bf)(t.borderRadius)," 0")}}},["&".concat(e,"-left")]:{["> ".concat(e,"-nav ").concat(e,"-tab")]:{borderRadius:{_skip_check_:!0,value:"".concat((0,s.bf)(t.borderRadius)," 0 0 ").concat((0,s.bf)(t.borderRadius))}}}},["&".concat(e,"-large")]:{["> ".concat(e,"-nav")]:{["".concat(e,"-tab")]:{padding:a}}}}}},tW=t=>{let{componentCls:e,itemActiveColor:n,itemHoverColor:a,iconCls:o,tabsHorizontalItemMargin:c,horizontalItemPadding:r,itemSelectedColor:i,itemColor:l}=t,d="".concat(e,"-tab");return{[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:r,fontSize:t.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":Object.assign({"&:focus:not(:focus-visible), &:active":{color:n}},(0,tz.Qy)(t)),"&-btn":{outline:"none",transition:"all 0.3s",["".concat(d,"-icon:not(:last-child)")]:{marginInlineEnd:t.marginSM}},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:t.calc(t.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:"all ".concat(t.motionDurationSlow),"&:hover":{color:t.colorTextHeading}},"&:hover":{color:a},["&".concat(d,"-active ").concat(d,"-btn")]:{color:i,textShadow:t.tabsActiveTextShadow},["&".concat(d,"-disabled")]:{color:t.colorTextDisabled,cursor:"not-allowed"},["&".concat(d,"-disabled ").concat(d,"-btn, &").concat(d,"-disabled ").concat(e,"-remove")]:{"&:focus, &:active":{color:t.colorTextDisabled}},["& ".concat(d,"-remove ").concat(o)]:{margin:0},["".concat(o,":not(:last-child)")]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},["".concat(d," + ").concat(d)]:{margin:{_skip_check_:!0,value:c}}}},tq=t=>{let{componentCls:e,tabsHorizontalItemMarginRTL:n,iconCls:a,cardGutter:o,calc:c}=t;return{["".concat(e,"-rtl")]:{direction:"rtl",["".concat(e,"-nav")]:{["".concat(e,"-tab")]:{margin:{_skip_check_:!0,value:n},["".concat(e,"-tab:last-of-type")]:{marginLeft:{_skip_check_:!0,value:0}},[a]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:(0,s.bf)(t.marginSM)}},["".concat(e,"-tab-remove")]:{marginRight:{_skip_check_:!0,value:(0,s.bf)(t.marginXS)},marginLeft:{_skip_check_:!0,value:(0,s.bf)(c(t.marginXXS).mul(-1).equal())},[a]:{margin:0}}}},["&".concat(e,"-left")]:{["> ".concat(e,"-nav")]:{order:1},["> ".concat(e,"-content-holder")]:{order:0}},["&".concat(e,"-right")]:{["> ".concat(e,"-nav")]:{order:0},["> ".concat(e,"-content-holder")]:{order:1}},["&".concat(e,"-card").concat(e,"-top, &").concat(e,"-card").concat(e,"-bottom")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-tab + ").concat(e,"-tab")]:{marginRight:{_skip_check_:!0,value:o},marginLeft:{_skip_check_:!0,value:0}}}}},["".concat(e,"-dropdown-rtl")]:{direction:"rtl"},["".concat(e,"-menu-item")]:{["".concat(e,"-dropdown-rtl")]:{textAlign:{_skip_check_:!0,value:"right"}}}}},tG=t=>{let{componentCls:e,tabsCardPadding:n,cardHeight:a,cardGutter:o,itemHoverColor:c,itemActiveColor:r,colorBorderSecondary:i}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,tz.Wf)(t)),{display:"flex",["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{position:"relative",display:"flex",flex:"none",alignItems:"center",["".concat(e,"-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(t.motionDurationSlow),content:"''",pointerEvents:"none"}},["".concat(e,"-nav-list")]:{position:"relative",display:"flex",transition:"opacity ".concat(t.motionDurationSlow)},["".concat(e,"-nav-operations")]:{display:"flex",alignSelf:"stretch"},["".concat(e,"-nav-operations-hidden")]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},["".concat(e,"-nav-more")]:{position:"relative",padding:n,background:"transparent",border:0,color:t.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.calc(t.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},["".concat(e,"-nav-add")]:Object.assign({minWidth:a,minHeight:a,marginLeft:{_skip_check_:!0,value:o},padding:"0 ".concat((0,s.bf)(t.paddingXS)),background:"transparent",border:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(i),borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0"),outline:"none",cursor:"pointer",color:t.colorText,transition:"all ".concat(t.motionDurationSlow," ").concat(t.motionEaseInOut),"&:hover":{color:c},"&:active, &:focus:not(:focus-visible)":{color:r}},(0,tz.Qy)(t))},["".concat(e,"-extra-content")]:{flex:"none"},["".concat(e,"-ink-bar")]:{position:"absolute",background:t.inkBarColor,pointerEvents:"none"}}),tW(t)),{["".concat(e,"-content")]:{position:"relative",width:"100%"},["".concat(e,"-content-holder")]:{flex:"auto",minWidth:0,minHeight:0},["".concat(e,"-tabpane")]:{outline:"none","&-hidden":{display:"none"}}}),["".concat(e,"-centered")]:{["> ".concat(e,"-nav, > div > ").concat(e,"-nav")]:{["".concat(e,"-nav-wrap")]:{["&:not([class*='".concat(e,"-nav-wrap-ping'])")]:{justifyContent:"center"}}}}}};var tH=(0,u.I$)("Tabs",t=>{let e=(0,b.TS)(t,{tabsCardPadding:t.cardPadding,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:"0 0 0 ".concat((0,s.bf)(t.horizontalItemGutter)),tabsHorizontalItemMarginRTL:"0 0 0 ".concat((0,s.bf)(t.horizontalItemGutter))});return[tD(e),tq(e),tB(e),tL(e),tI(e),tG(e),tP(e)]},t=>{let e=t.controlHeightLG;return{zIndexPopup:t.zIndexPopupBase+50,cardBg:t.colorFillAlter,cardHeight:e,cardPadding:"".concat((e-Math.round(t.fontSize*t.lineHeight))/2-t.lineWidth,"px ").concat(t.padding,"px"),cardPaddingSM:"".concat(1.5*t.paddingXXS,"px ").concat(t.padding,"px"),cardPaddingLG:"".concat(t.paddingXS,"px ").concat(t.padding,"px ").concat(1.5*t.paddingXXS,"px"),titleFontSize:t.fontSize,titleFontSizeLG:t.fontSizeLG,titleFontSizeSM:t.fontSize,inkBarColor:t.colorPrimary,horizontalMargin:"0 0 ".concat(t.margin,"px 0"),horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:"".concat(t.paddingSM,"px 0"),horizontalItemPaddingSM:"".concat(t.paddingXS,"px 0"),horizontalItemPaddingLG:"".concat(t.padding,"px 0"),verticalItemPadding:"".concat(t.paddingXS,"px ").concat(t.paddingLG,"px"),verticalItemMargin:"".concat(t.margin,"px 0 0 0"),itemColor:t.colorText,itemSelectedColor:t.colorPrimary,itemHoverColor:t.colorPrimaryHover,itemActiveColor:t.colorPrimaryActive,cardGutter:t.marginXXS/2}}),tA=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n};let tX=t=>{var e,n,o,r,d,s;let u;let{type:b,className:g,rootClassName:f,size:p,onEdit:m,hideAdd:v,centered:h,addIcon:y,popupClassName:k,children:x,items:w,animated:S,style:C,indicatorSize:E,indicator:O}=t,_=tA(t,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","popupClassName","children","items","animated","style","indicatorSize","indicator"]),{prefixCls:j,moreIcon:R=a.createElement(L.Z,null)}=_,{direction:Z,tabs:T,getPrefixCls:N,getPopupContainer:z}=a.useContext(i.E_),M=N("tabs",j),P=(0,tj.Z)(M),[D,W,q]=tH(M,P);"editable-card"===b&&(u={onEdit:(t,e)=>{let{key:n,event:a}=e;null==m||m("add"===t?a:n,t)},removeIcon:a.createElement(I.Z,null),addIcon:y||a.createElement(B.Z,null),showAdd:!0!==v});let G=N(),H=(0,l.Z)(p),A=w||(0,tT.Z)(x).map(t=>{if(a.isValidElement(t)){let{key:e,props:n}=t,a=n||{},{tab:o}=a,c=tN(a,["tab"]);return Object.assign(Object.assign({key:String(e)},c),{label:o})}return null}).filter(t=>t),X=function(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{inkBar:!0,tabPane:!1};return(e=!1===n?{inkBar:!1,tabPane:!1}:!0===n?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},"object"==typeof n?n:{})).tabPane&&(e.tabPaneMotion=Object.assign(Object.assign({},tZ),{motionName:(0,tR.m)(t,"switch")})),e}(M,S),K=Object.assign(Object.assign({},null==T?void 0:T.style),C),F={align:null!==(e=null==O?void 0:O.align)&&void 0!==e?e:null===(n=null==T?void 0:T.indicator)||void 0===n?void 0:n.align,size:null!==(s=null!==(r=null!==(o=null==O?void 0:O.size)&&void 0!==o?o:E)&&void 0!==r?r:null===(d=null==T?void 0:T.indicator)||void 0===d?void 0:d.size)&&void 0!==s?s:null==T?void 0:T.indicatorSize};return D(a.createElement(t_,Object.assign({direction:Z,getPopupContainer:z,moreTransitionName:"".concat(G,"-slide-up")},_,{items:A,className:c()({["".concat(M,"-").concat(H)]:H,["".concat(M,"-card")]:["card","editable-card"].includes(b),["".concat(M,"-editable-card")]:"editable-card"===b,["".concat(M,"-centered")]:h},null==T?void 0:T.className,g,f,W,q,P),popupClassName:c()(k,W,q,P),style:K,editable:u,moreIcon:R,prefixCls:M,animated:X,indicator:F})))};tX.TabPane=()=>null;var tK=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n},tF=t=>{var{prefixCls:e,className:n,hoverable:o=!0}=t,r=tK(t,["prefixCls","className","hoverable"]);let{getPrefixCls:l}=a.useContext(i.E_),d=l("card",e),s=c()("".concat(d,"-grid"),n,{["".concat(d,"-grid-hoverable")]:o});return a.createElement("div",Object.assign({},r,{className:s}))};let tY=t=>{let{antCls:e,componentCls:n,headerHeight:a,cardPaddingBase:o,tabsMarginBottom:c}=t;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:"0 ".concat((0,s.bf)(o)),color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.headerFontSize,background:t.headerBg,borderBottom:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorderSecondary),borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0")},(0,tz.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},tz.vS),{["\n > ".concat(n,"-typography,\n > ").concat(n,"-typography-edit-content\n ")]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),["".concat(e,"-tabs-top")]:{clear:"both",marginBottom:c,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,"&-bar":{borderBottom:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(t.colorBorderSecondary)}}})},tV=t=>{let{cardPaddingBase:e,colorBorderSecondary:n,cardShadow:a,lineWidth:o}=t;return{width:"33.33%",padding:e,border:0,borderRadius:0,boxShadow:"\n ".concat((0,s.bf)(o)," 0 0 0 ").concat(n,",\n 0 ").concat((0,s.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,s.bf)(o)," ").concat((0,s.bf)(o)," 0 0 ").concat(n,",\n ").concat((0,s.bf)(o)," 0 0 0 ").concat(n," inset,\n 0 ").concat((0,s.bf)(o)," 0 0 ").concat(n," inset;\n "),transition:"all ".concat(t.motionDurationMid),"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}},tQ=t=>{let{componentCls:e,iconCls:n,actionsLiMargin:a,cardActionsIconSize:o,colorBorderSecondary:c,actionsBg:r}=t;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:r,borderTop:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c),display:"flex",borderRadius:"0 0 ".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG))},(0,tz.dF)()),{"& > li":{margin:a,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.calc(t.cardActionsIconSize).mul(2).equal(),fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:"color ".concat(t.motionDurationMid)},["a:not(".concat(e,"-btn), > ").concat(n)]:{display:"inline-block",width:"100%",color:t.colorTextDescription,lineHeight:(0,s.bf)(t.fontHeight),transition:"color ".concat(t.motionDurationMid),"&:hover":{color:t.colorPrimary}},["> ".concat(n)]:{fontSize:o,lineHeight:(0,s.bf)(t.calc(o).mul(t.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c)}}})},t$=t=>Object.assign(Object.assign({margin:"".concat((0,s.bf)(t.calc(t.marginXXS).mul(-1).equal())," 0"),display:"flex"},(0,tz.dF)()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":Object.assign({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},tz.vS),"&-description":{color:t.colorTextDescription}}),tJ=t=>{let{componentCls:e,cardPaddingBase:n,colorFillAlter:a}=t;return{["".concat(e,"-head")]:{padding:"0 ".concat((0,s.bf)(n)),background:a,"&-title":{fontSize:t.fontSize}},["".concat(e,"-body")]:{padding:"".concat((0,s.bf)(t.padding)," ").concat((0,s.bf)(n))}}},tU=t=>{let{componentCls:e}=t;return{overflow:"hidden",["".concat(e,"-body")]:{userSelect:"none"}}},t0=t=>{let{antCls:e,componentCls:n,cardShadow:a,cardHeadPadding:o,colorBorderSecondary:c,boxShadowTertiary:r,cardPaddingBase:i,extraColor:l}=t;return{[n]:Object.assign(Object.assign({},(0,tz.Wf)(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,["&:not(".concat(n,"-bordered)")]:{boxShadow:r},["".concat(n,"-head")]:tY(t),["".concat(n,"-extra")]:{marginInlineStart:"auto",color:l,fontWeight:"normal",fontSize:t.fontSize},["".concat(n,"-body")]:Object.assign({padding:i,borderRadius:" 0 0 ".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG))},(0,tz.dF)()),["".concat(n,"-grid")]:tV(t),["".concat(n,"-cover")]:{"> *":{display:"block",width:"100%"},["img, img + ".concat(e,"-image-mask")]:{borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0")}},["".concat(n,"-actions")]:tQ(t),["".concat(n,"-meta")]:t$(t)}),["".concat(n,"-bordered")]:{border:"".concat((0,s.bf)(t.lineWidth)," ").concat(t.lineType," ").concat(c),["".concat(n,"-cover")]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},["".concat(n,"-hoverable")]:{cursor:"pointer",transition:"box-shadow ".concat(t.motionDurationMid,", border-color ").concat(t.motionDurationMid),"&:hover":{borderColor:"transparent",boxShadow:a}},["".concat(n,"-contain-grid")]:{borderRadius:"".concat((0,s.bf)(t.borderRadiusLG)," ").concat((0,s.bf)(t.borderRadiusLG)," 0 0 "),["".concat(n,"-body")]:{display:"flex",flexWrap:"wrap"},["&:not(".concat(n,"-loading) ").concat(n,"-body")]:{marginBlockStart:t.calc(t.lineWidth).mul(-1).equal(),marginInlineStart:t.calc(t.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")]:tJ(t),["".concat(n,"-loading")]:tU(t),["".concat(n,"-rtl")]:{direction:"rtl"}}},t1=t=>{let{componentCls:e,cardPaddingSM:n,headerHeightSM:a,headerFontSizeSM:o}=t;return{["".concat(e,"-small")]:{["> ".concat(e,"-head")]:{minHeight:a,padding:"0 ".concat((0,s.bf)(n)),fontSize:o,["> ".concat(e,"-head-wrapper")]:{["> ".concat(e,"-extra")]:{fontSize:t.fontSize}}},["> ".concat(e,"-body")]:{padding:n}},["".concat(e,"-small").concat(e,"-contain-tabs")]:{["> ".concat(e,"-head")]:{["".concat(e,"-head-title, ").concat(e,"-extra")]:{paddingTop:0,display:"flex",alignItems:"center"}}}}};var t2=(0,u.I$)("Card",t=>{let e=(0,b.TS)(t,{cardShadow:t.boxShadowCard,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardActionsIconSize:t.fontSize,cardPaddingSM:12});return[t0(e),t1(e)]},t=>({headerBg:"transparent",headerFontSize:t.fontSizeLG,headerFontSizeSM:t.fontSize,headerHeight:t.fontSizeLG*t.lineHeightLG+2*t.padding,headerHeightSM:t.fontSize*t.lineHeight+2*t.paddingXS,actionsBg:t.colorBgContainer,actionsLiMargin:"".concat(t.paddingSM,"px 0"),tabsMarginBottom:-t.padding-t.lineWidth,extraColor:t.colorText})),t4=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n};let t5=t=>{let{prefixCls:e,actions:n=[]}=t;return a.createElement("ul",{className:"".concat(e,"-actions")},n.map((t,e)=>a.createElement("li",{style:{width:"".concat(100/n.length,"%")},key:"action-".concat(e)},a.createElement("span",null,t))))},t7=a.forwardRef((t,e)=>{let n;let{prefixCls:o,className:d,rootClassName:s,style:u,extra:b,headStyle:g={},bodyStyle:f={},title:p,loading:m,bordered:v=!0,size:h,type:y,cover:k,actions:x,tabList:w,children:S,activeTabKey:C,defaultActiveTabKey:E,tabBarExtraContent:O,hoverable:_,tabProps:j={}}=t,R=t4(t,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:Z,direction:T,card:N}=a.useContext(i.E_),z=a.useMemo(()=>{let t=!1;return a.Children.forEach(S,e=>{e&&e.type&&e.type===tF&&(t=!0)}),t},[S]),M=Z("card",o),[I,L,B]=t2(M),D=a.createElement(P,{loading:!0,active:!0,paragraph:{rows:4},title:!1},S),W=void 0!==C,q=Object.assign(Object.assign({},j),{[W?"activeKey":"defaultActiveKey"]:W?C:E,tabBarExtraContent:O}),G=(0,l.Z)(h),H=G&&"default"!==G?G:"large",A=w?a.createElement(tX,Object.assign({size:H},q,{className:"".concat(M,"-head-tabs"),onChange:e=>{var n;null===(n=t.onTabChange)||void 0===n||n.call(t,e)},items:w.map(t=>{var{tab:e}=t;return Object.assign({label:e},t4(t,["tab"]))})})):null;(p||b||A)&&(n=a.createElement("div",{className:"".concat(M,"-head"),style:g},a.createElement("div",{className:"".concat(M,"-head-wrapper")},p&&a.createElement("div",{className:"".concat(M,"-head-title")},p),b&&a.createElement("div",{className:"".concat(M,"-extra")},b)),A));let X=k?a.createElement("div",{className:"".concat(M,"-cover")},k):null,K=a.createElement("div",{className:"".concat(M,"-body"),style:f},m?D:S),F=x&&x.length?a.createElement(t5,{prefixCls:M,actions:x}):null,Y=(0,r.Z)(R,["onTabChange"]),V=c()(M,null==N?void 0:N.className,{["".concat(M,"-loading")]:m,["".concat(M,"-bordered")]:v,["".concat(M,"-hoverable")]:_,["".concat(M,"-contain-grid")]:z,["".concat(M,"-contain-tabs")]:w&&w.length,["".concat(M,"-").concat(G)]:G,["".concat(M,"-type-").concat(y)]:!!y,["".concat(M,"-rtl")]:"rtl"===T},d,s,L,B),Q=Object.assign(Object.assign({},null==N?void 0:N.style),u);return I(a.createElement("div",Object.assign({ref:e},Y,{className:V,style:Q}),n,X,K,F))});var t8=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&0>e.indexOf(a)&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,a=Object.getOwnPropertySymbols(t);oe.indexOf(a[o])&&Object.prototype.propertyIsEnumerable.call(t,a[o])&&(n[a[o]]=t[a[o]]);return n};t7.Grid=tF,t7.Meta=t=>{let{prefixCls:e,className:n,avatar:o,title:r,description:l}=t,d=t8(t,["prefixCls","className","avatar","title","description"]),{getPrefixCls:s}=a.useContext(i.E_),u=s("card",e),b=c()("".concat(u,"-meta"),n),g=o?a.createElement("div",{className:"".concat(u,"-meta-avatar")},o):null,f=r?a.createElement("div",{className:"".concat(u,"-meta-title")},r):null,p=l?a.createElement("div",{className:"".concat(u,"-meta-description")},l):null,m=f||p?a.createElement("div",{className:"".concat(u,"-meta-detail")},f,p):null;return a.createElement("div",Object.assign({},d,{className:b}),g,m)};var t6=t7},10900:function(t,e,n){var a=n(2265);let o=a.forwardRef(function(t,e){return a.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:e},t),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});e.Z=o},53410:function(t,e,n){var a=n(2265);let o=a.forwardRef(function(t,e){return a.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:e},t),a.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"}))});e.Z=o}}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/3603-b101c17ea3d68f19.js b/ui/litellm-dashboard/out/_next/static/chunks/3603-dd19ac8e31e4bc25.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/3603-b101c17ea3d68f19.js rename to ui/litellm-dashboard/out/_next/static/chunks/3603-dd19ac8e31e4bc25.js index b582cf54e3e..537461fa290 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/3603-b101c17ea3d68f19.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/3603-dd19ac8e31e4bc25.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3603],{15327:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),c=n(2265),a={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"},r=n(55015),l=c.forwardRef(function(e,t){return c.createElement(r.Z,(0,o.Z)({},e,{ref:t,icon:a}))})},80795:function(e,t,n){n.d(t,{Z:function(){return X}});var o=n(2265),c=n(77565),a=n(36760),r=n.n(a),l=n(71030),i=n(74126),s=n(50506),d=n(18694),u=n(62236),m=n(92736),p=n(93942),g=n(19722),b=n(13613),f=n(95140),v=n(71744),h=n(45937),y=n(88208),w=n(29961),C=n(12918),I=n(18544),O=n(29382),x=n(691),S=n(88260),B=n(80669),j=n(3104),k=e=>{let{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:c}=e,a="".concat(n,"-item");return{["".concat(t,", ").concat(t,"-menu-submenu")]:{["".concat(n," ").concat(a)]:{["&".concat(a,"-danger:not(").concat(a,"-disabled)")]:{color:o,"&:hover":{color:c,backgroundColor:o}}}}}},E=n(34442),N=n(352);let z=e=>{let{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:c,sizePopupArrow:a,antCls:r,iconCls:l,motionDurationMid:i,paddingBlock:s,fontSize:d,dropdownEdgeChildPadding:u,colorTextDisabled:m,fontSizeIcon:p,controlPaddingHorizontal:g,colorBgElevated:b}=e;return[{[t]:Object.assign(Object.assign({},(0,C.Wf)(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:e.calc(a).div(2).sub(c).equal(),zIndex:-9999,opacity:1e-4,content:'""'},["&-trigger".concat(r,"-btn")]:{["& > ".concat(l,"-down, & > ").concat(r,"-btn-icon > ").concat(l,"-down")]:{fontSize:p}},["".concat(t,"-wrap")]:{position:"relative",["".concat(r,"-btn > ").concat(l,"-down")]:{fontSize:p},["".concat(l,"-down::before")]:{transition:"transform ".concat(i)}},["".concat(t,"-wrap-open")]:{["".concat(l,"-down::before")]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},["&".concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottomRight,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottomRight")]:{animationName:I.fJ},["&".concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-topRight,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-topRight")]:{animationName:I.Qt},["&".concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottomRight")]:{animationName:I.Uw},["&".concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-topRight")]:{animationName:I.ly}})},(0,S.ZP)(e,b,{arrowPlacement:{top:!0,bottom:!0}}),{["".concat(t," ").concat(n)]:{position:"relative",margin:0},["".concat(n,"-submenu-popup")]:{position:"absolute",zIndex:o,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:u,listStyleType:"none",backgroundColor:b,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},(0,C.Qy)(e)),{["".concat(n,"-item-group-title")]:{padding:"".concat((0,N.bf)(s)," ").concat((0,N.bf)(g)),color:e.colorTextDescription,transition:"all ".concat(i)},["".concat(n,"-item")]:{position:"relative",display:"flex",alignItems:"center"},["".concat(n,"-item-icon")]:{minWidth:d,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},["".concat(n,"-title-content")]:{flex:"auto","> a":{color:"inherit",transition:"all ".concat(i),"&: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,N.bf)(s)," ").concat((0,N.bf)(g)),color:e.colorText,fontWeight:"normal",fontSize:d,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(i),borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},(0,C.Qy)(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:b,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:"".concat((0,N.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,N.bf)(e.marginXS)),padding:0,listStyle:"none"},["".concat(n,"-submenu-title")]:{paddingInlineEnd:e.calc(g).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:m,backgroundColor:b,cursor:"not-allowed"}},["".concat(n,"-submenu-selected ").concat(t,"-menu-submenu-title")]:{color:e.colorPrimary}})}},[(0,I.oN)(e,"slide-up"),(0,I.oN)(e,"slide-down"),(0,O.Fm)(e,"move-up"),(0,O.Fm)(e,"move-down"),(0,x._y)(e,"zoom-big")]]};var H=(0,B.I$)("Dropdown",e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:o,componentCls:c}=e,a=(0,j.TS)(e,{menuCls:"".concat(c,"-menu"),dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:o});return[z(a),k(a)]},e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},(0,S.wZ)({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),(0,E.w)(e))),P=n(64024);let T=e=>{let t;let{menu:n,arrow:a,prefixCls:p,children:C,trigger:I,disabled:O,dropdownRender:x,getPopupContainer:S,overlayClassName:B,rootClassName:j,overlayStyle:k,open:E,onOpenChange:N,visible:z,onVisibleChange:T,mouseEnterDelay:R=.15,mouseLeaveDelay:Z=.1,autoAdjustOverflow:A=!0,placement:M="",overlay:D,transitionName:W}=e,{getPopupContainer:L,getPrefixCls:X,direction:_,dropdown:q}=o.useContext(v.E_);(0,b.ln)("Dropdown");let F=o.useMemo(()=>{let e=X();return void 0!==W?W:M.includes("top")?"".concat(e,"-slide-down"):"".concat(e,"-slide-up")},[X,M,W]),Y=o.useMemo(()=>M?M.includes("Center")?M.slice(0,M.indexOf("Center")):M:"rtl"===_?"bottomRight":"bottomLeft",[M,_]),G=X("dropdown",p),$=(0,P.Z)(G),[U,V,J]=H(G,$),[,Q]=(0,w.ZP)(),K=o.Children.only(C),ee=(0,g.Tm)(K,{className:r()("".concat(G,"-trigger"),{["".concat(G,"-rtl")]:"rtl"===_},K.props.className),disabled:O}),et=O?[]:I;et&&et.includes("contextMenu")&&(t=!0);let[en,eo]=(0,s.Z)(!1,{value:null!=E?E:z}),ec=(0,i.zX)(e=>{null==N||N(e,{source:"trigger"}),null==T||T(e),eo(e)}),ea=r()(B,j,V,J,$,null==q?void 0:q.className,{["".concat(G,"-rtl")]:"rtl"===_}),er=(0,m.Z)({arrowPointAtCenter:"object"==typeof a&&a.pointAtCenter,autoAdjustOverflow:A,offset:Q.marginXXS,arrowWidth:a?Q.sizePopupArrow:0,borderRadius:Q.borderRadius}),el=o.useCallback(()=>{null!=n&&n.selectable&&null!=n&&n.multiple||(null==N||N(!1,{source:"menu"}),eo(!1))},[null==n?void 0:n.selectable,null==n?void 0:n.multiple]),[ei,es]=(0,u.Cn)("Dropdown",null==k?void 0:k.zIndex),ed=o.createElement(l.Z,Object.assign({alignPoint:t},(0,d.Z)(e,["rootClassName"]),{mouseEnterDelay:R,mouseLeaveDelay:Z,visible:en,builtinPlacements:er,arrow:!!a,overlayClassName:ea,prefixCls:G,getPopupContainer:S||L,transitionName:F,trigger:et,overlay:()=>{let e;return e=(null==n?void 0:n.items)?o.createElement(h.Z,Object.assign({},n)):"function"==typeof D?D():D,x&&(e=x(e)),e=o.Children.only("string"==typeof e?o.createElement("span",null,e):e),o.createElement(y.J,{prefixCls:"".concat(G,"-menu"),rootClassName:r()(J,$),expandIcon:o.createElement("span",{className:"".concat(G,"-menu-submenu-arrow")},o.createElement(c.Z,{className:"".concat(G,"-menu-submenu-arrow-icon")})),mode:"vertical",selectable:!1,onClick:el,validator:e=>{let{mode:t}=e}},e)},placement:Y,onVisibleChange:ec,overlayStyle:Object.assign(Object.assign(Object.assign({},null==q?void 0:q.style),k),{zIndex:ei})}),ee);return ei&&(ed=o.createElement(f.Z.Provider,{value:es},ed)),U(ed)},R=(0,p.Z)(T,"dropdown",e=>e,function(e){return Object.assign(Object.assign({},e),{align:{overflow:{adjustX:!1,adjustY:!1}}})});T._InternalPanelDoNotUseOrYouWillBeFired=e=>o.createElement(R,Object.assign({},e),o.createElement("span",null));var Z=n(60440),A=n(73002),M=n(93142),D=n(65658),W=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let L=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:c}=o.useContext(v.E_),{prefixCls:a,type:l="default",danger:i,disabled:s,loading:d,onClick:u,htmlType:m,children:p,className:g,menu:b,arrow:f,autoFocus:h,overlay:y,trigger:w,align:C,open:I,onOpenChange:O,placement:x,getPopupContainer:S,href:B,icon:j=o.createElement(Z.Z,null),title:k,buttonsRender:E=e=>e,mouseEnterDelay:N,mouseLeaveDelay:z,overlayClassName:H,overlayStyle:P,destroyPopupOnHide:R,dropdownRender:L}=e,X=W(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"]),_=n("dropdown",a),q={menu:b,arrow:f,autoFocus:h,align:C,disabled:s,trigger:s?[]:w,onOpenChange:O,getPopupContainer:S||t,mouseEnterDelay:N,mouseLeaveDelay:z,overlayClassName:H,overlayStyle:P,destroyPopupOnHide:R,dropdownRender:L},{compactSize:F,compactItemClassnames:Y}=(0,D.ri)(_,c),G=r()("".concat(_,"-button"),Y,g);"overlay"in e&&(q.overlay=y),"open"in e&&(q.open=I),"placement"in e?q.placement=x:q.placement="rtl"===c?"bottomLeft":"bottomRight";let[$,U]=E([o.createElement(A.ZP,{type:l,danger:i,disabled:s,loading:d,onClick:u,htmlType:m,href:B,title:k},p),o.createElement(A.ZP,{type:l,danger:i,icon:j})]);return o.createElement(M.Z.Compact,Object.assign({className:G,size:F,block:!0},X),$,o.createElement(T,Object.assign({},q),U))};L.__ANT_BUTTON=!0,T.Button=L;var X=T},92239:function(e,t,n){let o;n.d(t,{D:function(){return y},Z:function(){return C}});var c=n(2265),a=n(1119),r={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),i=c.forwardRef(function(e,t){return c.createElement(l.Z,(0,a.Z)({},e,{ref:t,icon:r}))}),s=n(15327),d=n(77565),u=n(36760),m=n.n(u),p=n(18694),g=e=>!isNaN(parseFloat(e))&&isFinite(e),b=n(71744),f=n(80856),v=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let h={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},y=c.createContext({}),w=(o=0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return o+=1,"".concat(e).concat(o)});var C=c.forwardRef((e,t)=>{let{prefixCls:n,className:o,trigger:a,children:r,defaultCollapsed:l=!1,theme:u="dark",style:C={},collapsible:I=!1,reverseArrow:O=!1,width:x=200,collapsedWidth:S=80,zeroWidthTriggerStyle:B,breakpoint:j,onCollapse:k,onBreakpoint:E}=e,N=v(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:z}=(0,c.useContext)(f.V),[H,P]=(0,c.useState)("collapsed"in e?e.collapsed:l),[T,R]=(0,c.useState)(!1);(0,c.useEffect)(()=>{"collapsed"in e&&P(e.collapsed)},[e.collapsed]);let Z=(t,n)=>{"collapsed"in e||P(t),null==k||k(t,n)},A=(0,c.useRef)();A.current=e=>{R(e.matches),null==E||E(e.matches),H!==e.matches&&Z(e.matches,"responsive")},(0,c.useEffect)(()=>{let e;function t(e){return A.current(e)}if("undefined"!=typeof window){let{matchMedia:n}=window;if(n&&j&&j in h){e=n("screen and (max-width: ".concat(h[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,c.useEffect)(()=>{let e=w("ant-sider-");return z.addSider(e),()=>z.removeSider(e)},[]);let M=()=>{Z(!H,"clickTrigger")},{getPrefixCls:D}=(0,c.useContext)(b.E_),W=c.useMemo(()=>({siderCollapsed:H}),[H]);return c.createElement(y.Provider,{value:W},(()=>{let e=D("layout-sider",n),l=(0,p.Z)(N,["collapsed"]),b=H?S:x,f=g(b)?"".concat(b,"px"):String(b),v=0===parseFloat(String(S||0))?c.createElement("span",{onClick:M,className:m()("".concat(e,"-zero-width-trigger"),"".concat(e,"-zero-width-trigger-").concat(O?"right":"left")),style:B},a||c.createElement(i,null)):null,h={expanded:O?c.createElement(d.Z,null):c.createElement(s.Z,null),collapsed:O?c.createElement(s.Z,null):c.createElement(d.Z,null)}[H?"collapsed":"expanded"],y=null!==a?v||c.createElement("div",{className:"".concat(e,"-trigger"),onClick:M,style:{width:f}},a||h):null,w=Object.assign(Object.assign({},C),{flex:"0 0 ".concat(f),maxWidth:f,minWidth:f,width:f}),j=m()(e,"".concat(e,"-").concat(u),{["".concat(e,"-collapsed")]:!!H,["".concat(e,"-has-trigger")]:I&&null!==a&&!v,["".concat(e,"-below")]:!!T,["".concat(e,"-zero-width")]:0===parseFloat(f)},o);return c.createElement("aside",Object.assign({className:j},l,{style:w,ref:t}),c.createElement("div",{className:"".concat(e,"-children")},r),I||T&&v?y:null)})())})},80856:function(e,t,n){n.d(t,{V:function(){return o}});let o=n(2265).createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},88208:function(e,t,n){n.d(t,{J:function(){return i}});var o=n(2265),c=n(74126),a=n(65658),r=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let l=o.createContext(null),i=o.forwardRef((e,t)=>{let{children:n}=e,i=r(e,["children"]),s=o.useContext(l),d=o.useMemo(()=>Object.assign(Object.assign({},s),i),[s,i.prefixCls,i.mode,i.selectable,i.rootClassName]),u=(0,c.t4)(n),m=(0,c.x1)(t,u?n.ref:null);return o.createElement(l.Provider,{value:d},o.createElement(a.BR,null,u?o.cloneElement(n,{ref:m}):n))});t.Z=l},45937:function(e,t,n){n.d(t,{Z:function(){return Y}});var o=n(2265),c=n(33082),a=n(92239),r=n(60440),l=n(36760),i=n.n(l),s=n(74126),d=n(18694),u=n(68710),m=n(19722),p=n(71744),g=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n},b=e=>{let{prefixCls:t,className:n,dashed:a}=e,r=g(e,["prefixCls","className","dashed"]),{getPrefixCls:l}=o.useContext(p.E_),s=l("menu",t),d=i()({["".concat(s,"-item-divider-dashed")]:!!a},n);return o.createElement(c.iz,Object.assign({className:d},r))},f=n(45287),v=n(89970);let h=(0,o.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var y=e=>{var t;let{className:n,children:r,icon:l,title:s,danger:u}=e,{prefixCls:p,firstLevel:g,direction:b,disableMenuItemTitleTooltip:y,inlineCollapsed:w}=o.useContext(h),{siderCollapsed:C}=o.useContext(a.D),I=s;void 0===s?I=g?r:"":!1===s&&(I="");let O={title:I};C||w||(O.title=null,O.open=!1);let x=(0,f.Z)(r).length,S=o.createElement(c.ck,Object.assign({},(0,d.Z)(e,["title","icon","danger"]),{className:i()({["".concat(p,"-item-danger")]:u,["".concat(p,"-item-only-child")]:(l?x+1:x)===1},n),title:"string"==typeof s?s:void 0}),(0,m.Tm)(l,{className:i()((0,m.l$)(l)?null===(t=l.props)||void 0===t?void 0:t.className:"","".concat(p,"-item-icon"))}),(e=>{let t=o.createElement("span",{className:"".concat(p,"-title-content")},r);return(!l||(0,m.l$)(r)&&"span"===r.type)&&r&&e&&g&&"string"==typeof r?o.createElement("div",{className:"".concat(p,"-inline-collapsed-noicon")},r.charAt(0)):t})(w));return y||(S=o.createElement(v.Z,Object.assign({},O,{placement:"rtl"===b?"left":"right",overlayClassName:"".concat(p,"-inline-collapsed-tooltip")}),S)),S},w=n(62236),C=e=>{var t;let n;let{popupClassName:a,icon:r,title:l,theme:s}=e,u=o.useContext(h),{prefixCls:p,inlineCollapsed:g,theme:b}=u,f=(0,c.Xl)();if(r){let e=(0,m.l$)(l)&&"span"===l.type;n=o.createElement(o.Fragment,null,(0,m.Tm)(r,{className:i()((0,m.l$)(r)?null===(t=r.props)||void 0===t?void 0:t.className:"","".concat(p,"-item-icon"))}),e?l:o.createElement("span",{className:"".concat(p,"-title-content")},l))}else n=g&&!f.length&&l&&"string"==typeof l?o.createElement("div",{className:"".concat(p,"-inline-collapsed-noicon")},l.charAt(0)):o.createElement("span",{className:"".concat(p,"-title-content")},l);let v=o.useMemo(()=>Object.assign(Object.assign({},u),{firstLevel:!1}),[u]),[y]=(0,w.Cn)("Menu");return o.createElement(h.Provider,{value:v},o.createElement(c.Wd,Object.assign({},(0,d.Z)(e,["icon"]),{title:n,popupClassName:i()(p,a,"".concat(p,"-").concat(s||b)),popupStyle:{zIndex:y}})))},I=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n},O=n(88208),x=n(352),S=n(36360),B=n(12918),j=n(63074),k=n(18544),E=n(691),N=n(80669),z=n(3104),H=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:o,colorSplit:c,lineWidth:a,lineType:r,itemPaddingInline:l}=e;return{["".concat(t,"-horizontal")]:{lineHeight:o,border:0,borderBottom:"".concat((0,x.bf)(a)," ").concat(r," ").concat(c),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"}}}},P=e=>{let{componentCls:t,menuArrowOffset:n,calc:o}=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,x.bf)(o(n).mul(-1).equal()),")")},"&::after":{transform:"rotate(45deg) translateY(".concat((0,x.bf)(n),")")}}}}};let T=e=>Object.assign({},(0,B.oN)(e));var R=(e,t)=>{let{componentCls:n,itemColor:o,itemSelectedColor:c,groupTitleColor:a,itemBg:r,subMenuItemBg:l,itemSelectedBg:i,activeBarHeight:s,activeBarWidth:d,activeBarBorderWidth:u,motionDurationSlow:m,motionEaseInOut:p,motionEaseOut:g,itemPaddingInline:b,motionDurationMid:f,itemHoverColor:v,lineType:h,colorSplit:y,itemDisabledColor:w,dangerItemColor:C,dangerItemHoverColor:I,dangerItemSelectedColor:O,dangerItemActiveBg:S,dangerItemSelectedBg:B,popupBg:j,itemHoverBg:k,itemActiveBg:E,menuSubMenuBg:N,horizontalItemSelectedColor:z,horizontalItemSelectedBg:H,horizontalItemBorderRadius:P,horizontalItemHoverBg:R}=e;return{["".concat(n,"-").concat(t,", ").concat(n,"-").concat(t," > ").concat(n)]:{color:o,background:r,["&".concat(n,"-root:focus-visible")]:Object.assign({},T(e)),["".concat(n,"-item-group-title")]:{color:a},["".concat(n,"-submenu-selected")]:{["> ".concat(n,"-submenu-title")]:{color:c}},["".concat(n,"-item-disabled, ").concat(n,"-submenu-disabled")]:{color:"".concat(w," !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:k},"&:active":{backgroundColor:E}},["".concat(n,"-submenu-title")]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:E}}},["".concat(n,"-item-danger")]:{color:C,["&".concat(n,"-item:hover")]:{["&:not(".concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{color:I}},["&".concat(n,"-item:active")]:{background:S}},["".concat(n,"-item a")]:{"&, &:hover":{color:"inherit"}},["".concat(n,"-item-selected")]:{color:c,["&".concat(n,"-item-danger")]:{color:O},"a, a:hover":{color:"inherit"}},["& ".concat(n,"-item-selected")]:{backgroundColor:i,["&".concat(n,"-item-danger")]:{backgroundColor:B}},["".concat(n,"-item, ").concat(n,"-submenu-title")]:{["&:not(".concat(n,"-item-disabled):focus-visible")]:Object.assign({},T(e))},["&".concat(n,"-submenu > ").concat(n)]:{backgroundColor:N},["&".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:u,marginTop:e.calc(u).mul(-1).equal(),marginBottom:0,borderRadius:P,"&::after":{position:"absolute",insetInline:b,bottom:0,borderBottom:"".concat((0,x.bf)(s)," solid transparent"),transition:"border-color ".concat(m," ").concat(p),content:'""'},"&:hover, &-active, &-open":{background:R,"&::after":{borderBottomWidth:s,borderBottomColor:z}},"&-selected":{color:z,backgroundColor:H,"&:hover":{backgroundColor:H},"&::after":{borderBottomWidth:s,borderBottomColor:z}}}}),["&".concat(n,"-root")]:{["&".concat(n,"-inline, &").concat(n,"-vertical")]:{borderInlineEnd:"".concat((0,x.bf)(u)," ").concat(h," ").concat(y)}},["&".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,x.bf)(d)," solid ").concat(c),transform:"scaleY(0.0001)",opacity:0,transition:["transform ".concat(f," ").concat(g),"opacity ".concat(f," ").concat(g)].join(","),content:'""'},["&".concat(n,"-item-danger")]:{"&::after":{borderInlineEndColor:O}}},["".concat(n,"-selected, ").concat(n,"-item-selected")]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform ".concat(f," ").concat(p),"opacity ".concat(f," ").concat(p)].join(",")}}}}}};let Z=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:o,padding:c,menuArrowSize:a,marginXS:r,itemMarginBlock:l,itemWidth:i}=e,s=e.calc(a).add(c).add(r).equal();return{["".concat(t,"-item")]:{position:"relative",overflow:"hidden"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,x.bf)(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:l,width:i},["> ".concat(t,"-item,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,x.bf)(n)},["".concat(t,"-item-group-list ").concat(t,"-submenu-title,\n ").concat(t,"-submenu-title")]:{paddingInlineEnd:s}}};var A=e=>{let{componentCls:t,iconCls:n,itemHeight:o,colorTextLightSolid:c,dropdownWidth:a,controlHeightLG:r,motionDurationMid:l,motionEaseOut:i,paddingXL:s,itemMarginInline:d,fontSizeLG:u,motionDurationSlow:m,paddingXS:p,boxShadowSecondary:g,collapsedWidth:b,collapsedIconSize:f}=e,v={height:o,lineHeight:(0,x.bf)(o),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({["&".concat(t,"-root")]:{boxShadow:"none"}},Z(e))},["".concat(t,"-submenu-popup")]:{["".concat(t,"-vertical")]:Object.assign(Object.assign({},Z(e)),{boxShadow:g})}},{["".concat(t,"-submenu-popup ").concat(t,"-vertical").concat(t,"-sub")]:{minWidth:a,maxHeight:"calc(100vh - ".concat((0,x.bf)(e.calc(r).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(m),"background ".concat(m),"padding ".concat(l," ").concat(i)].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:b,["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu ").concat(t,"-submenu-title")]:{["> ".concat(t,"-inline-collapsed-noicon")]:{fontSize:u,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,x.bf)(e.calc(u).div(2).equal())," - ").concat((0,x.bf)(d),")"),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:f,lineHeight:(0,x.bf)(o),"+ 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:c}},["".concat(t,"-item-group-title")]:Object.assign(Object.assign({},B.vS),{paddingInline:p})}}]};let M=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:o,motionEaseInOut:c,motionEaseOut:a,iconCls:r,iconSize:l,iconMarginInlineEnd:i}=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(c)].join(","),["".concat(t,"-item-icon, ").concat(r)]:{minWidth:l,fontSize:l,transition:["font-size ".concat(o," ").concat(a),"margin ".concat(n," ").concat(c),"color ".concat(n)].join(","),"+ span":{marginInlineStart:i,opacity:1,transition:["opacity ".concat(n," ").concat(c),"margin ".concat(n),"color ".concat(n)].join(",")}},["".concat(t,"-item-icon")]:Object.assign({},(0,B.Ro)()),["&".concat(t,"-item-only-child")]:{["> ".concat(r,", > ").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"}}}},D=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:o,borderRadius:c,menuArrowSize:a,menuArrowOffset:r}=e;return{["".concat(t,"-submenu")]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:"transform ".concat(n," ").concat(o,", opacity ").concat(n)},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:c,transition:["background ".concat(n," ").concat(o),"transform ".concat(n," ").concat(o),"top ".concat(n," ").concat(o),"color ".concat(n," ").concat(o)].join(","),content:'""'},"&::before":{transform:"rotate(45deg) translateY(".concat((0,x.bf)(e.calc(r).mul(-1).equal()),")")},"&::after":{transform:"rotate(-45deg) translateY(".concat((0,x.bf)(r),")")}}}}},W=e=>{let{antCls:t,componentCls:n,fontSize:o,motionDurationSlow:c,motionDurationMid:a,motionEaseInOut:r,paddingXS:l,padding:i,colorSplit:s,lineWidth:d,zIndexPopup:u,borderRadiusLG:m,subMenuItemBorderRadius:p,menuArrowSize:g,menuArrowOffset:b,lineType:f,menuPanelMaskInset:v,groupTitleLineHeight:h,groupTitleFontSize:y}=e;return[{"":{["".concat(n)]:Object.assign(Object.assign({},(0,B.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,B.Wf)(e)),(0,B.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:"width ".concat(c," 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,x.bf)(l)," ").concat((0,x.bf)(i)),fontSize:y,lineHeight:h,transition:"all ".concat(c)},["&-horizontal ".concat(n,"-submenu")]:{transition:["border-color ".concat(c," ").concat(r),"background ".concat(c," ").concat(r)].join(",")},["".concat(n,"-submenu, ").concat(n,"-submenu-inline")]:{transition:["border-color ".concat(c," ").concat(r),"background ".concat(c," ").concat(r),"padding ".concat(a," ").concat(r)].join(",")},["".concat(n,"-submenu ").concat(n,"-sub")]:{cursor:"initial",transition:["background ".concat(c," ").concat(r),"padding ".concat(c," ").concat(r)].join(",")},["".concat(n,"-title-content")]:{transition:"color ".concat(c),["> ".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:f,borderWidth:0,borderTopWidth:d,marginBlock:d,padding:0,"&-dashed":{borderStyle:"dashed"}}}),M(e)),{["".concat(n,"-item-group")]:{["".concat(n,"-item-group-list")]:{margin:0,padding:0,["".concat(n,"-item, ").concat(n,"-submenu-title")]:{paddingInline:"".concat((0,x.bf)(e.calc(o).mul(2).equal())," ").concat((0,x.bf)(i))}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:u,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",["&".concat(n,"-submenu")]:{background:"transparent"},"&::before":{position:"absolute",inset:"".concat((0,x.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:m},M(e)),D(e)),{["".concat(n,"-item, ").concat(n,"-submenu > ").concat(n,"-submenu-title")]:{borderRadius:p},["".concat(n,"-submenu-title::after")]:{transition:"transform ".concat(c," ").concat(r)}})}}),D(e)),{["&-inline-collapsed ".concat(n,"-submenu-arrow,\n &-inline ").concat(n,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateX(".concat((0,x.bf)(b),")")},"&::after":{transform:"rotate(45deg) translateX(".concat((0,x.bf)(e.calc(b).mul(-1).equal()),")")}},["".concat(n,"-submenu-open").concat(n,"-submenu-inline > ").concat(n,"-submenu-title > ").concat(n,"-submenu-arrow")]:{transform:"translateY(".concat((0,x.bf)(e.calc(g).mul(.2).mul(-1).equal()),")"),"&::after":{transform:"rotate(-45deg) translateX(".concat((0,x.bf)(e.calc(b).mul(-1).equal()),")")},"&::before":{transform:"rotate(45deg) translateX(".concat((0,x.bf)(b),")")}}})},{["".concat(t,"-layout-header")]:{[n]:{lineHeight:"inherit"}}}]},L=e=>{var t,n,o;let{colorPrimary:c,colorError:a,colorTextDisabled:r,colorErrorBg:l,colorText:i,colorTextDescription:s,colorBgContainer:d,colorFillAlter:u,colorFillContent:m,lineWidth:p,lineWidthBold:g,controlItemBgActive:b,colorBgTextHover:f,controlHeightLG:v,lineHeight:h,colorBgElevated:y,marginXXS:w,padding:C,fontSize:I,controlHeightSM:O,fontSizeLG:x,colorTextLightSolid:B,colorErrorHover:j}=e,k=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,E=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:p,N=null!==(o=e.itemMarginInline)&&void 0!==o?o:e.marginXXS,z=new S.C(B).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:c,horizontalItemHoverColor:c,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:c,itemSelectedColor:c,colorItemTextSelectedHorizontal:c,horizontalItemSelectedColor:c,colorItemBg:d,itemBg:d,colorItemBgHover:f,itemHoverBg:f,colorItemBgActive:m,itemActiveBg:b,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:b,itemSelectedBg:b,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:k,colorActiveBarHeight:g,activeBarHeight:g,colorActiveBarBorderSize:p,activeBarBorderWidth:E,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:N,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:h,collapsedWidth:2*v,popupBg:y,itemMarginBlock:w,itemPaddingInline:C,horizontalLineHeight:"".concat(1.15*v,"px"),iconSize:I,iconMarginInlineEnd:O-I,collapsedIconSize:x,groupTitleFontSize:I,darkItemDisabledColor:new S.C(B).setAlpha(.25).toRgbString(),darkItemColor:z,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:B,darkItemSelectedBg:c,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:z,darkItemHoverColor:B,darkDangerItemHoverColor:j,darkDangerItemSelectedColor:B,darkDangerItemActiveBg:a,itemWidth:k?"calc(100% + ".concat(E,"px)"):"calc(100% - ".concat(2*N,"px)")}};var X=n(64024),_=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let q=(0,o.forwardRef)((e,t)=>{var n,a;let l;let g=o.useContext(O.Z),f=g||{},{getPrefixCls:v,getPopupContainer:w,direction:x,menu:S}=o.useContext(p.E_),B=v(),{prefixCls:T,className:Z,style:M,theme:D="light",expandIcon:q,_internalDisableMenuItemTitleTooltip:F,inlineCollapsed:Y,siderCollapsed:G,items:$,children:U,rootClassName:V,mode:J,selectable:Q,onClick:K,overflowedIndicatorPopupClassName:ee}=e,et=_(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),en=(0,d.Z)(et,["collapsedWidth"]),eo=o.useMemo(()=>$?function e(t){return(t||[]).map((t,n)=>{if(t&&"object"==typeof t){let{label:a,children:r,key:l,type:i}=t,s=I(t,["label","children","key","type"]),d=null!=l?l:"tmp-".concat(n);return r||"group"===i?"group"===i?o.createElement(c.BW,Object.assign({key:d},s,{title:a}),e(r)):o.createElement(C,Object.assign({key:d},s,{title:a}),e(r)):"divider"===i?o.createElement(b,Object.assign({key:d},s)):o.createElement(y,Object.assign({key:d},s),a)}return null}).filter(e=>e)}($):$,[$])||U;null===(n=f.validator)||void 0===n||n.call(f,{mode:J});let ec=(0,s.zX)(function(){var e;null==K||K.apply(void 0,arguments),null===(e=f.onClick)||void 0===e||e.call(f)}),ea=f.mode||J,er=null!=Q?Q:f.selectable,el=o.useMemo(()=>void 0!==G?G:Y,[Y,G]),ei={horizontal:{motionName:"".concat(B,"-slide-up")},inline:(0,u.Z)(B),other:{motionName:"".concat(B,"-zoom-big")}},es=v("menu",T||f.prefixCls),ed=(0,X.Z)(es),[eu,em,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,N.I$)("Menu",e=>{let{colorBgElevated:t,colorPrimary:n,colorTextLightSolid:o,controlHeightLG:c,fontSize:a,darkItemColor:r,darkDangerItemColor:l,darkItemBg:i,darkSubMenuItemBg:s,darkItemSelectedColor:d,darkItemSelectedBg:u,darkDangerItemSelectedBg:m,darkItemHoverBg:p,darkGroupTitleColor:g,darkItemHoverColor:b,darkItemDisabledColor:f,darkDangerItemHoverColor:v,darkDangerItemSelectedColor:h,darkDangerItemActiveBg:y,popupBg:w,darkPopupBg:C}=e,I=e.calc(a).div(7).mul(5).equal(),O=(0,z.TS)(e,{menuArrowSize:I,menuHorizontalHeight:e.calc(c).mul(1.15).equal(),menuArrowOffset:e.calc(I).mul(.25).equal(),menuPanelMaskInset:-7,menuSubMenuBg:t,calc:e.calc,popupBg:w}),x=(0,z.TS)(O,{itemColor:r,itemHoverColor:b,groupTitleColor:g,itemSelectedColor:d,itemBg:i,popupBg:C,subMenuItemBg:s,itemActiveBg:"transparent",itemSelectedBg:u,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:p,itemDisabledColor:f,dangerItemColor:l,dangerItemHoverColor:v,dangerItemSelectedColor:h,dangerItemActiveBg:y,dangerItemSelectedBg:m,menuSubMenuBg:s,horizontalItemSelectedColor:o,horizontalItemSelectedBg:n});return[W(O),H(O),A(O),R(O,"light"),R(x,"dark"),P(O),(0,j.Z)(O),(0,k.oN)(O,"slide-up"),(0,k.oN)(O,"slide-down"),(0,E._y)(O,"zoom-big")]},L,{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,ed,!g),eg=i()("".concat(es,"-").concat(D),null==S?void 0:S.className,Z);if("function"==typeof q)l=q;else if(null===q||!1===q)l=null;else if(null===f.expandIcon||!1===f.expandIcon)l=null;else{let e=null!=q?q:f.expandIcon;l=(0,m.Tm)(e,{className:i()("".concat(es,"-submenu-expand-icon"),(0,m.l$)(e)?null===(a=e.props)||void 0===a?void 0:a.className:"")})}let eb=o.useMemo(()=>({prefixCls:es,inlineCollapsed:el||!1,direction:x,firstLevel:!0,theme:D,mode:ea,disableMenuItemTitleTooltip:F}),[es,el,x,F,D]);return eu(o.createElement(O.Z.Provider,{value:null},o.createElement(h.Provider,{value:eb},o.createElement(c.ZP,Object.assign({getPopupContainer:w,overflowedIndicator:o.createElement(r.Z,null),overflowedIndicatorPopupClassName:i()(es,"".concat(es,"-").concat(D),ee),mode:ea,selectable:er,onClick:ec},en,{inlineCollapsed:el,style:Object.assign(Object.assign({},null==S?void 0:S.style),M),className:eg,prefixCls:es,direction:x,defaultMotions:ei,expandIcon:l,ref:t,rootClassName:i()(V,em,f.rootClassName,ep,ed)}),eo))))}),F=(0,o.forwardRef)((e,t)=>{let n=(0,o.useRef)(null),c=o.useContext(a.D);return(0,o.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{var t;null===(t=n.current)||void 0===t||t.focus(e)}})),o.createElement(q,Object.assign({ref:n},e,c))});F.Item=y,F.SubMenu=C,F.Divider=b,F.ItemGroup=c.BW;var Y=F},93142:function(e,t,n){n.d(t,{Z:function(){return v}});var o=n(2265),c=n(36760),a=n.n(c),r=n(45287);function l(e){return["small","middle","large"].includes(e)}function i(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}var s=n(71744),d=n(65658);let u=o.createContext({latestIndex:0}),m=u.Provider;var p=e=>{let{className:t,index:n,children:c,split:a,style:r}=e,{latestIndex:l}=o.useContext(u);return null==c?null:o.createElement(o.Fragment,null,o.createElement("div",{className:t,style:r},c),nt.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let f=o.forwardRef((e,t)=>{var n,c;let{getPrefixCls:d,space:u,direction:f}=o.useContext(s.E_),{size:v=(null==u?void 0:u.size)||"small",align:h,className:y,rootClassName:w,children:C,direction:I="horizontal",prefixCls:O,split:x,style:S,wrap:B=!1,classNames:j,styles:k}=e,E=b(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[N,z]=Array.isArray(v)?v:[v,v],H=l(z),P=l(N),T=i(z),R=i(N),Z=(0,r.Z)(C,{keepEmpty:!0}),A=void 0===h&&"horizontal"===I?"center":h,M=d("space",O),[D,W,L]=(0,g.Z)(M),X=a()(M,null==u?void 0:u.className,W,"".concat(M,"-").concat(I),{["".concat(M,"-rtl")]:"rtl"===f,["".concat(M,"-align-").concat(A)]:A,["".concat(M,"-gap-row-").concat(z)]:H,["".concat(M,"-gap-col-").concat(N)]:P},y,w,L),_=a()("".concat(M,"-item"),null!==(n=null==j?void 0:j.item)&&void 0!==n?n:null===(c=null==u?void 0:u.classNames)||void 0===c?void 0:c.item),q=0,F=Z.map((e,t)=>{var n,c;null!=e&&(q=t);let a=e&&e.key||"".concat(_,"-").concat(t);return o.createElement(p,{className:_,key:a,index:t,split:x,style:null!==(n=null==k?void 0:k.item)&&void 0!==n?n:null===(c=null==u?void 0:u.styles)||void 0===c?void 0:c.item},e)}),Y=o.useMemo(()=>({latestIndex:q}),[q]);if(0===Z.length)return null;let G={};return B&&(G.flexWrap="wrap"),!P&&R&&(G.columnGap=N),!H&&T&&(G.rowGap=z),D(o.createElement("div",Object.assign({ref:t,className:X,style:Object.assign(Object.assign(Object.assign({},G),null==u?void 0:u.style),S)},E),o.createElement(m,{value:Y},F)))});f.Compact=d.ZP;var v=f},79205:function(e,t,n){n.d(t,{Z:function(){return u}});var o=n(2265);let c=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),r=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),n=0;n!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()},i=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,o.forwardRef)((e,t)=>{let{color:n="currentColor",size:c=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:d="",children:u,iconNode:m,...p}=e;return(0,o.createElement)("svg",{ref:t,...s,width:c,height:c,stroke:n,strokeWidth:r?24*Number(a)/Number(c):a,className:l("lucide",d),...!u&&!i(p)&&{"aria-hidden":"true"},...p},[...m.map(e=>{let[t,n]=e;return(0,o.createElement)(t,n)}),...Array.isArray(u)?u:[u]])}),u=(e,t)=>{let n=(0,o.forwardRef)((n,a)=>{let{className:i,...s}=n;return(0,o.createElement)(d,{ref:a,iconNode:t,className:l("lucide-".concat(c(r(e))),"lucide-".concat(e),i),...s})});return n.displayName=r(e),n}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3603],{15327:function(e,t,n){n.d(t,{Z:function(){return l}});var o=n(1119),c=n(2265),a={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"},r=n(55015),l=c.forwardRef(function(e,t){return c.createElement(r.Z,(0,o.Z)({},e,{ref:t,icon:a}))})},80795:function(e,t,n){n.d(t,{Z:function(){return X}});var o=n(2265),c=n(77565),a=n(36760),r=n.n(a),l=n(71030),i=n(74126),s=n(50506),d=n(18694),u=n(62236),m=n(92736),p=n(93942),g=n(19722),b=n(13613),f=n(95140),v=n(71744),h=n(45937),y=n(88208),w=n(29961),C=n(12918),I=n(18544),O=n(29382),x=n(691),S=n(88260),B=n(80669),j=n(3104),k=e=>{let{componentCls:t,menuCls:n,colorError:o,colorTextLightSolid:c}=e,a="".concat(n,"-item");return{["".concat(t,", ").concat(t,"-menu-submenu")]:{["".concat(n," ").concat(a)]:{["&".concat(a,"-danger:not(").concat(a,"-disabled)")]:{color:o,"&:hover":{color:c,backgroundColor:o}}}}}},E=n(34442),N=n(352);let z=e=>{let{componentCls:t,menuCls:n,zIndexPopup:o,dropdownArrowDistance:c,sizePopupArrow:a,antCls:r,iconCls:l,motionDurationMid:i,paddingBlock:s,fontSize:d,dropdownEdgeChildPadding:u,colorTextDisabled:m,fontSizeIcon:p,controlPaddingHorizontal:g,colorBgElevated:b}=e;return[{[t]:Object.assign(Object.assign({},(0,C.Wf)(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:o,display:"block","&::before":{position:"absolute",insetBlock:e.calc(a).div(2).sub(c).equal(),zIndex:-9999,opacity:1e-4,content:'""'},["&-trigger".concat(r,"-btn")]:{["& > ".concat(l,"-down, & > ").concat(r,"-btn-icon > ").concat(l,"-down")]:{fontSize:p}},["".concat(t,"-wrap")]:{position:"relative",["".concat(r,"-btn > ").concat(l,"-down")]:{fontSize:p},["".concat(l,"-down::before")]:{transition:"transform ".concat(i)}},["".concat(t,"-wrap-open")]:{["".concat(l,"-down::before")]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},["&".concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-enter").concat(r,"-slide-down-enter-active").concat(t,"-placement-bottomRight,\n &").concat(r,"-slide-down-appear").concat(r,"-slide-down-appear-active").concat(t,"-placement-bottomRight")]:{animationName:I.fJ},["&".concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-enter").concat(r,"-slide-up-enter-active").concat(t,"-placement-topRight,\n &").concat(r,"-slide-up-appear").concat(r,"-slide-up-appear-active").concat(t,"-placement-topRight")]:{animationName:I.Qt},["&".concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottomLeft,\n &").concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottom,\n &").concat(r,"-slide-down-leave").concat(r,"-slide-down-leave-active").concat(t,"-placement-bottomRight")]:{animationName:I.Uw},["&".concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-topLeft,\n &").concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-top,\n &").concat(r,"-slide-up-leave").concat(r,"-slide-up-leave-active").concat(t,"-placement-topRight")]:{animationName:I.ly}})},(0,S.ZP)(e,b,{arrowPlacement:{top:!0,bottom:!0}}),{["".concat(t," ").concat(n)]:{position:"relative",margin:0},["".concat(n,"-submenu-popup")]:{position:"absolute",zIndex:o,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:u,listStyleType:"none",backgroundColor:b,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},(0,C.Qy)(e)),{["".concat(n,"-item-group-title")]:{padding:"".concat((0,N.bf)(s)," ").concat((0,N.bf)(g)),color:e.colorTextDescription,transition:"all ".concat(i)},["".concat(n,"-item")]:{position:"relative",display:"flex",alignItems:"center"},["".concat(n,"-item-icon")]:{minWidth:d,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},["".concat(n,"-title-content")]:{flex:"auto","> a":{color:"inherit",transition:"all ".concat(i),"&: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,N.bf)(s)," ").concat((0,N.bf)(g)),color:e.colorText,fontWeight:"normal",fontSize:d,lineHeight:e.lineHeight,cursor:"pointer",transition:"all ".concat(i),borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},(0,C.Qy)(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:b,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:"".concat((0,N.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,N.bf)(e.marginXS)),padding:0,listStyle:"none"},["".concat(n,"-submenu-title")]:{paddingInlineEnd:e.calc(g).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:m,backgroundColor:b,cursor:"not-allowed"}},["".concat(n,"-submenu-selected ").concat(t,"-menu-submenu-title")]:{color:e.colorPrimary}})}},[(0,I.oN)(e,"slide-up"),(0,I.oN)(e,"slide-down"),(0,O.Fm)(e,"move-up"),(0,O.Fm)(e,"move-down"),(0,x._y)(e,"zoom-big")]]};var H=(0,B.I$)("Dropdown",e=>{let{marginXXS:t,sizePopupArrow:n,paddingXXS:o,componentCls:c}=e,a=(0,j.TS)(e,{menuCls:"".concat(c,"-menu"),dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:o});return[z(a),k(a)]},e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},(0,S.wZ)({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),(0,E.w)(e))),P=n(64024);let T=e=>{let t;let{menu:n,arrow:a,prefixCls:p,children:C,trigger:I,disabled:O,dropdownRender:x,getPopupContainer:S,overlayClassName:B,rootClassName:j,overlayStyle:k,open:E,onOpenChange:N,visible:z,onVisibleChange:T,mouseEnterDelay:R=.15,mouseLeaveDelay:Z=.1,autoAdjustOverflow:A=!0,placement:M="",overlay:D,transitionName:W}=e,{getPopupContainer:L,getPrefixCls:X,direction:_,dropdown:q}=o.useContext(v.E_);(0,b.ln)("Dropdown");let F=o.useMemo(()=>{let e=X();return void 0!==W?W:M.includes("top")?"".concat(e,"-slide-down"):"".concat(e,"-slide-up")},[X,M,W]),Y=o.useMemo(()=>M?M.includes("Center")?M.slice(0,M.indexOf("Center")):M:"rtl"===_?"bottomRight":"bottomLeft",[M,_]),G=X("dropdown",p),$=(0,P.Z)(G),[U,V,J]=H(G,$),[,Q]=(0,w.ZP)(),K=o.Children.only(C),ee=(0,g.Tm)(K,{className:r()("".concat(G,"-trigger"),{["".concat(G,"-rtl")]:"rtl"===_},K.props.className),disabled:O}),et=O?[]:I;et&&et.includes("contextMenu")&&(t=!0);let[en,eo]=(0,s.Z)(!1,{value:null!=E?E:z}),ec=(0,i.zX)(e=>{null==N||N(e,{source:"trigger"}),null==T||T(e),eo(e)}),ea=r()(B,j,V,J,$,null==q?void 0:q.className,{["".concat(G,"-rtl")]:"rtl"===_}),er=(0,m.Z)({arrowPointAtCenter:"object"==typeof a&&a.pointAtCenter,autoAdjustOverflow:A,offset:Q.marginXXS,arrowWidth:a?Q.sizePopupArrow:0,borderRadius:Q.borderRadius}),el=o.useCallback(()=>{null!=n&&n.selectable&&null!=n&&n.multiple||(null==N||N(!1,{source:"menu"}),eo(!1))},[null==n?void 0:n.selectable,null==n?void 0:n.multiple]),[ei,es]=(0,u.Cn)("Dropdown",null==k?void 0:k.zIndex),ed=o.createElement(l.Z,Object.assign({alignPoint:t},(0,d.Z)(e,["rootClassName"]),{mouseEnterDelay:R,mouseLeaveDelay:Z,visible:en,builtinPlacements:er,arrow:!!a,overlayClassName:ea,prefixCls:G,getPopupContainer:S||L,transitionName:F,trigger:et,overlay:()=>{let e;return e=(null==n?void 0:n.items)?o.createElement(h.Z,Object.assign({},n)):"function"==typeof D?D():D,x&&(e=x(e)),e=o.Children.only("string"==typeof e?o.createElement("span",null,e):e),o.createElement(y.J,{prefixCls:"".concat(G,"-menu"),rootClassName:r()(J,$),expandIcon:o.createElement("span",{className:"".concat(G,"-menu-submenu-arrow")},o.createElement(c.Z,{className:"".concat(G,"-menu-submenu-arrow-icon")})),mode:"vertical",selectable:!1,onClick:el,validator:e=>{let{mode:t}=e}},e)},placement:Y,onVisibleChange:ec,overlayStyle:Object.assign(Object.assign(Object.assign({},null==q?void 0:q.style),k),{zIndex:ei})}),ee);return ei&&(ed=o.createElement(f.Z.Provider,{value:es},ed)),U(ed)},R=(0,p.Z)(T,"dropdown",e=>e,function(e){return Object.assign(Object.assign({},e),{align:{overflow:{adjustX:!1,adjustY:!1}}})});T._InternalPanelDoNotUseOrYouWillBeFired=e=>o.createElement(R,Object.assign({},e),o.createElement("span",null));var Z=n(39760),A=n(73002),M=n(93142),D=n(65658),W=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let L=e=>{let{getPopupContainer:t,getPrefixCls:n,direction:c}=o.useContext(v.E_),{prefixCls:a,type:l="default",danger:i,disabled:s,loading:d,onClick:u,htmlType:m,children:p,className:g,menu:b,arrow:f,autoFocus:h,overlay:y,trigger:w,align:C,open:I,onOpenChange:O,placement:x,getPopupContainer:S,href:B,icon:j=o.createElement(Z.Z,null),title:k,buttonsRender:E=e=>e,mouseEnterDelay:N,mouseLeaveDelay:z,overlayClassName:H,overlayStyle:P,destroyPopupOnHide:R,dropdownRender:L}=e,X=W(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"]),_=n("dropdown",a),q={menu:b,arrow:f,autoFocus:h,align:C,disabled:s,trigger:s?[]:w,onOpenChange:O,getPopupContainer:S||t,mouseEnterDelay:N,mouseLeaveDelay:z,overlayClassName:H,overlayStyle:P,destroyPopupOnHide:R,dropdownRender:L},{compactSize:F,compactItemClassnames:Y}=(0,D.ri)(_,c),G=r()("".concat(_,"-button"),Y,g);"overlay"in e&&(q.overlay=y),"open"in e&&(q.open=I),"placement"in e?q.placement=x:q.placement="rtl"===c?"bottomLeft":"bottomRight";let[$,U]=E([o.createElement(A.ZP,{type:l,danger:i,disabled:s,loading:d,onClick:u,htmlType:m,href:B,title:k},p),o.createElement(A.ZP,{type:l,danger:i,icon:j})]);return o.createElement(M.Z.Compact,Object.assign({className:G,size:F,block:!0},X),$,o.createElement(T,Object.assign({},q),U))};L.__ANT_BUTTON=!0,T.Button=L;var X=T},92239:function(e,t,n){let o;n.d(t,{D:function(){return y},Z:function(){return C}});var c=n(2265),a=n(1119),r={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),i=c.forwardRef(function(e,t){return c.createElement(l.Z,(0,a.Z)({},e,{ref:t,icon:r}))}),s=n(15327),d=n(77565),u=n(36760),m=n.n(u),p=n(18694),g=e=>!isNaN(parseFloat(e))&&isFinite(e),b=n(71744),f=n(80856),v=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let h={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},y=c.createContext({}),w=(o=0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return o+=1,"".concat(e).concat(o)});var C=c.forwardRef((e,t)=>{let{prefixCls:n,className:o,trigger:a,children:r,defaultCollapsed:l=!1,theme:u="dark",style:C={},collapsible:I=!1,reverseArrow:O=!1,width:x=200,collapsedWidth:S=80,zeroWidthTriggerStyle:B,breakpoint:j,onCollapse:k,onBreakpoint:E}=e,N=v(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:z}=(0,c.useContext)(f.V),[H,P]=(0,c.useState)("collapsed"in e?e.collapsed:l),[T,R]=(0,c.useState)(!1);(0,c.useEffect)(()=>{"collapsed"in e&&P(e.collapsed)},[e.collapsed]);let Z=(t,n)=>{"collapsed"in e||P(t),null==k||k(t,n)},A=(0,c.useRef)();A.current=e=>{R(e.matches),null==E||E(e.matches),H!==e.matches&&Z(e.matches,"responsive")},(0,c.useEffect)(()=>{let e;function t(e){return A.current(e)}if("undefined"!=typeof window){let{matchMedia:n}=window;if(n&&j&&j in h){e=n("screen and (max-width: ".concat(h[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,c.useEffect)(()=>{let e=w("ant-sider-");return z.addSider(e),()=>z.removeSider(e)},[]);let M=()=>{Z(!H,"clickTrigger")},{getPrefixCls:D}=(0,c.useContext)(b.E_),W=c.useMemo(()=>({siderCollapsed:H}),[H]);return c.createElement(y.Provider,{value:W},(()=>{let e=D("layout-sider",n),l=(0,p.Z)(N,["collapsed"]),b=H?S:x,f=g(b)?"".concat(b,"px"):String(b),v=0===parseFloat(String(S||0))?c.createElement("span",{onClick:M,className:m()("".concat(e,"-zero-width-trigger"),"".concat(e,"-zero-width-trigger-").concat(O?"right":"left")),style:B},a||c.createElement(i,null)):null,h={expanded:O?c.createElement(d.Z,null):c.createElement(s.Z,null),collapsed:O?c.createElement(s.Z,null):c.createElement(d.Z,null)}[H?"collapsed":"expanded"],y=null!==a?v||c.createElement("div",{className:"".concat(e,"-trigger"),onClick:M,style:{width:f}},a||h):null,w=Object.assign(Object.assign({},C),{flex:"0 0 ".concat(f),maxWidth:f,minWidth:f,width:f}),j=m()(e,"".concat(e,"-").concat(u),{["".concat(e,"-collapsed")]:!!H,["".concat(e,"-has-trigger")]:I&&null!==a&&!v,["".concat(e,"-below")]:!!T,["".concat(e,"-zero-width")]:0===parseFloat(f)},o);return c.createElement("aside",Object.assign({className:j},l,{style:w,ref:t}),c.createElement("div",{className:"".concat(e,"-children")},r),I||T&&v?y:null)})())})},80856:function(e,t,n){n.d(t,{V:function(){return o}});let o=n(2265).createContext({siderHook:{addSider:()=>null,removeSider:()=>null}})},88208:function(e,t,n){n.d(t,{J:function(){return i}});var o=n(2265),c=n(74126),a=n(65658),r=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let l=o.createContext(null),i=o.forwardRef((e,t)=>{let{children:n}=e,i=r(e,["children"]),s=o.useContext(l),d=o.useMemo(()=>Object.assign(Object.assign({},s),i),[s,i.prefixCls,i.mode,i.selectable,i.rootClassName]),u=(0,c.t4)(n),m=(0,c.x1)(t,u?n.ref:null);return o.createElement(l.Provider,{value:d},o.createElement(a.BR,null,u?o.cloneElement(n,{ref:m}):n))});t.Z=l},45937:function(e,t,n){n.d(t,{Z:function(){return Y}});var o=n(2265),c=n(33082),a=n(92239),r=n(39760),l=n(36760),i=n.n(l),s=n(74126),d=n(18694),u=n(68710),m=n(19722),p=n(71744),g=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n},b=e=>{let{prefixCls:t,className:n,dashed:a}=e,r=g(e,["prefixCls","className","dashed"]),{getPrefixCls:l}=o.useContext(p.E_),s=l("menu",t),d=i()({["".concat(s,"-item-divider-dashed")]:!!a},n);return o.createElement(c.iz,Object.assign({className:d},r))},f=n(45287),v=n(89970);let h=(0,o.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var y=e=>{var t;let{className:n,children:r,icon:l,title:s,danger:u}=e,{prefixCls:p,firstLevel:g,direction:b,disableMenuItemTitleTooltip:y,inlineCollapsed:w}=o.useContext(h),{siderCollapsed:C}=o.useContext(a.D),I=s;void 0===s?I=g?r:"":!1===s&&(I="");let O={title:I};C||w||(O.title=null,O.open=!1);let x=(0,f.Z)(r).length,S=o.createElement(c.ck,Object.assign({},(0,d.Z)(e,["title","icon","danger"]),{className:i()({["".concat(p,"-item-danger")]:u,["".concat(p,"-item-only-child")]:(l?x+1:x)===1},n),title:"string"==typeof s?s:void 0}),(0,m.Tm)(l,{className:i()((0,m.l$)(l)?null===(t=l.props)||void 0===t?void 0:t.className:"","".concat(p,"-item-icon"))}),(e=>{let t=o.createElement("span",{className:"".concat(p,"-title-content")},r);return(!l||(0,m.l$)(r)&&"span"===r.type)&&r&&e&&g&&"string"==typeof r?o.createElement("div",{className:"".concat(p,"-inline-collapsed-noicon")},r.charAt(0)):t})(w));return y||(S=o.createElement(v.Z,Object.assign({},O,{placement:"rtl"===b?"left":"right",overlayClassName:"".concat(p,"-inline-collapsed-tooltip")}),S)),S},w=n(62236),C=e=>{var t;let n;let{popupClassName:a,icon:r,title:l,theme:s}=e,u=o.useContext(h),{prefixCls:p,inlineCollapsed:g,theme:b}=u,f=(0,c.Xl)();if(r){let e=(0,m.l$)(l)&&"span"===l.type;n=o.createElement(o.Fragment,null,(0,m.Tm)(r,{className:i()((0,m.l$)(r)?null===(t=r.props)||void 0===t?void 0:t.className:"","".concat(p,"-item-icon"))}),e?l:o.createElement("span",{className:"".concat(p,"-title-content")},l))}else n=g&&!f.length&&l&&"string"==typeof l?o.createElement("div",{className:"".concat(p,"-inline-collapsed-noicon")},l.charAt(0)):o.createElement("span",{className:"".concat(p,"-title-content")},l);let v=o.useMemo(()=>Object.assign(Object.assign({},u),{firstLevel:!1}),[u]),[y]=(0,w.Cn)("Menu");return o.createElement(h.Provider,{value:v},o.createElement(c.Wd,Object.assign({},(0,d.Z)(e,["icon"]),{title:n,popupClassName:i()(p,a,"".concat(p,"-").concat(s||b)),popupStyle:{zIndex:y}})))},I=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n},O=n(88208),x=n(352),S=n(36360),B=n(12918),j=n(63074),k=n(18544),E=n(691),N=n(80669),z=n(3104),H=e=>{let{componentCls:t,motionDurationSlow:n,horizontalLineHeight:o,colorSplit:c,lineWidth:a,lineType:r,itemPaddingInline:l}=e;return{["".concat(t,"-horizontal")]:{lineHeight:o,border:0,borderBottom:"".concat((0,x.bf)(a)," ").concat(r," ").concat(c),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"}}}},P=e=>{let{componentCls:t,menuArrowOffset:n,calc:o}=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,x.bf)(o(n).mul(-1).equal()),")")},"&::after":{transform:"rotate(45deg) translateY(".concat((0,x.bf)(n),")")}}}}};let T=e=>Object.assign({},(0,B.oN)(e));var R=(e,t)=>{let{componentCls:n,itemColor:o,itemSelectedColor:c,groupTitleColor:a,itemBg:r,subMenuItemBg:l,itemSelectedBg:i,activeBarHeight:s,activeBarWidth:d,activeBarBorderWidth:u,motionDurationSlow:m,motionEaseInOut:p,motionEaseOut:g,itemPaddingInline:b,motionDurationMid:f,itemHoverColor:v,lineType:h,colorSplit:y,itemDisabledColor:w,dangerItemColor:C,dangerItemHoverColor:I,dangerItemSelectedColor:O,dangerItemActiveBg:S,dangerItemSelectedBg:B,popupBg:j,itemHoverBg:k,itemActiveBg:E,menuSubMenuBg:N,horizontalItemSelectedColor:z,horizontalItemSelectedBg:H,horizontalItemBorderRadius:P,horizontalItemHoverBg:R}=e;return{["".concat(n,"-").concat(t,", ").concat(n,"-").concat(t," > ").concat(n)]:{color:o,background:r,["&".concat(n,"-root:focus-visible")]:Object.assign({},T(e)),["".concat(n,"-item-group-title")]:{color:a},["".concat(n,"-submenu-selected")]:{["> ".concat(n,"-submenu-title")]:{color:c}},["".concat(n,"-item-disabled, ").concat(n,"-submenu-disabled")]:{color:"".concat(w," !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:k},"&:active":{backgroundColor:E}},["".concat(n,"-submenu-title")]:{"&:hover":{backgroundColor:k},"&:active":{backgroundColor:E}}},["".concat(n,"-item-danger")]:{color:C,["&".concat(n,"-item:hover")]:{["&:not(".concat(n,"-item-selected):not(").concat(n,"-submenu-selected)")]:{color:I}},["&".concat(n,"-item:active")]:{background:S}},["".concat(n,"-item a")]:{"&, &:hover":{color:"inherit"}},["".concat(n,"-item-selected")]:{color:c,["&".concat(n,"-item-danger")]:{color:O},"a, a:hover":{color:"inherit"}},["& ".concat(n,"-item-selected")]:{backgroundColor:i,["&".concat(n,"-item-danger")]:{backgroundColor:B}},["".concat(n,"-item, ").concat(n,"-submenu-title")]:{["&:not(".concat(n,"-item-disabled):focus-visible")]:Object.assign({},T(e))},["&".concat(n,"-submenu > ").concat(n)]:{backgroundColor:N},["&".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:u,marginTop:e.calc(u).mul(-1).equal(),marginBottom:0,borderRadius:P,"&::after":{position:"absolute",insetInline:b,bottom:0,borderBottom:"".concat((0,x.bf)(s)," solid transparent"),transition:"border-color ".concat(m," ").concat(p),content:'""'},"&:hover, &-active, &-open":{background:R,"&::after":{borderBottomWidth:s,borderBottomColor:z}},"&-selected":{color:z,backgroundColor:H,"&:hover":{backgroundColor:H},"&::after":{borderBottomWidth:s,borderBottomColor:z}}}}),["&".concat(n,"-root")]:{["&".concat(n,"-inline, &").concat(n,"-vertical")]:{borderInlineEnd:"".concat((0,x.bf)(u)," ").concat(h," ").concat(y)}},["&".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,x.bf)(d)," solid ").concat(c),transform:"scaleY(0.0001)",opacity:0,transition:["transform ".concat(f," ").concat(g),"opacity ".concat(f," ").concat(g)].join(","),content:'""'},["&".concat(n,"-item-danger")]:{"&::after":{borderInlineEndColor:O}}},["".concat(n,"-selected, ").concat(n,"-item-selected")]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform ".concat(f," ").concat(p),"opacity ".concat(f," ").concat(p)].join(",")}}}}}};let Z=e=>{let{componentCls:t,itemHeight:n,itemMarginInline:o,padding:c,menuArrowSize:a,marginXS:r,itemMarginBlock:l,itemWidth:i}=e,s=e.calc(a).add(c).add(r).equal();return{["".concat(t,"-item")]:{position:"relative",overflow:"hidden"},["".concat(t,"-item, ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,x.bf)(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:l,width:i},["> ".concat(t,"-item,\n > ").concat(t,"-submenu > ").concat(t,"-submenu-title")]:{height:n,lineHeight:(0,x.bf)(n)},["".concat(t,"-item-group-list ").concat(t,"-submenu-title,\n ").concat(t,"-submenu-title")]:{paddingInlineEnd:s}}};var A=e=>{let{componentCls:t,iconCls:n,itemHeight:o,colorTextLightSolid:c,dropdownWidth:a,controlHeightLG:r,motionDurationMid:l,motionEaseOut:i,paddingXL:s,itemMarginInline:d,fontSizeLG:u,motionDurationSlow:m,paddingXS:p,boxShadowSecondary:g,collapsedWidth:b,collapsedIconSize:f}=e,v={height:o,lineHeight:(0,x.bf)(o),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({["&".concat(t,"-root")]:{boxShadow:"none"}},Z(e))},["".concat(t,"-submenu-popup")]:{["".concat(t,"-vertical")]:Object.assign(Object.assign({},Z(e)),{boxShadow:g})}},{["".concat(t,"-submenu-popup ").concat(t,"-vertical").concat(t,"-sub")]:{minWidth:a,maxHeight:"calc(100vh - ".concat((0,x.bf)(e.calc(r).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(m),"background ".concat(m),"padding ".concat(l," ").concat(i)].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:b,["&".concat(t,"-root")]:{["".concat(t,"-item, ").concat(t,"-submenu ").concat(t,"-submenu-title")]:{["> ".concat(t,"-inline-collapsed-noicon")]:{fontSize:u,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,x.bf)(e.calc(u).div(2).equal())," - ").concat((0,x.bf)(d),")"),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:f,lineHeight:(0,x.bf)(o),"+ 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:c}},["".concat(t,"-item-group-title")]:Object.assign(Object.assign({},B.vS),{paddingInline:p})}}]};let M=e=>{let{componentCls:t,motionDurationSlow:n,motionDurationMid:o,motionEaseInOut:c,motionEaseOut:a,iconCls:r,iconSize:l,iconMarginInlineEnd:i}=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(c)].join(","),["".concat(t,"-item-icon, ").concat(r)]:{minWidth:l,fontSize:l,transition:["font-size ".concat(o," ").concat(a),"margin ".concat(n," ").concat(c),"color ".concat(n)].join(","),"+ span":{marginInlineStart:i,opacity:1,transition:["opacity ".concat(n," ").concat(c),"margin ".concat(n),"color ".concat(n)].join(",")}},["".concat(t,"-item-icon")]:Object.assign({},(0,B.Ro)()),["&".concat(t,"-item-only-child")]:{["> ".concat(r,", > ").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"}}}},D=e=>{let{componentCls:t,motionDurationSlow:n,motionEaseInOut:o,borderRadius:c,menuArrowSize:a,menuArrowOffset:r}=e;return{["".concat(t,"-submenu")]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:"transform ".concat(n," ").concat(o,", opacity ").concat(n)},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:c,transition:["background ".concat(n," ").concat(o),"transform ".concat(n," ").concat(o),"top ".concat(n," ").concat(o),"color ".concat(n," ").concat(o)].join(","),content:'""'},"&::before":{transform:"rotate(45deg) translateY(".concat((0,x.bf)(e.calc(r).mul(-1).equal()),")")},"&::after":{transform:"rotate(-45deg) translateY(".concat((0,x.bf)(r),")")}}}}},W=e=>{let{antCls:t,componentCls:n,fontSize:o,motionDurationSlow:c,motionDurationMid:a,motionEaseInOut:r,paddingXS:l,padding:i,colorSplit:s,lineWidth:d,zIndexPopup:u,borderRadiusLG:m,subMenuItemBorderRadius:p,menuArrowSize:g,menuArrowOffset:b,lineType:f,menuPanelMaskInset:v,groupTitleLineHeight:h,groupTitleFontSize:y}=e;return[{"":{["".concat(n)]:Object.assign(Object.assign({},(0,B.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,B.Wf)(e)),(0,B.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:o,lineHeight:0,listStyle:"none",outline:"none",transition:"width ".concat(c," 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,x.bf)(l)," ").concat((0,x.bf)(i)),fontSize:y,lineHeight:h,transition:"all ".concat(c)},["&-horizontal ".concat(n,"-submenu")]:{transition:["border-color ".concat(c," ").concat(r),"background ".concat(c," ").concat(r)].join(",")},["".concat(n,"-submenu, ").concat(n,"-submenu-inline")]:{transition:["border-color ".concat(c," ").concat(r),"background ".concat(c," ").concat(r),"padding ".concat(a," ").concat(r)].join(",")},["".concat(n,"-submenu ").concat(n,"-sub")]:{cursor:"initial",transition:["background ".concat(c," ").concat(r),"padding ".concat(c," ").concat(r)].join(",")},["".concat(n,"-title-content")]:{transition:"color ".concat(c),["> ".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:f,borderWidth:0,borderTopWidth:d,marginBlock:d,padding:0,"&-dashed":{borderStyle:"dashed"}}}),M(e)),{["".concat(n,"-item-group")]:{["".concat(n,"-item-group-list")]:{margin:0,padding:0,["".concat(n,"-item, ").concat(n,"-submenu-title")]:{paddingInline:"".concat((0,x.bf)(e.calc(o).mul(2).equal())," ").concat((0,x.bf)(i))}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:u,borderRadius:m,boxShadow:"none",transformOrigin:"0 0",["&".concat(n,"-submenu")]:{background:"transparent"},"&::before":{position:"absolute",inset:"".concat((0,x.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:m},M(e)),D(e)),{["".concat(n,"-item, ").concat(n,"-submenu > ").concat(n,"-submenu-title")]:{borderRadius:p},["".concat(n,"-submenu-title::after")]:{transition:"transform ".concat(c," ").concat(r)}})}}),D(e)),{["&-inline-collapsed ".concat(n,"-submenu-arrow,\n &-inline ").concat(n,"-submenu-arrow")]:{"&::before":{transform:"rotate(-45deg) translateX(".concat((0,x.bf)(b),")")},"&::after":{transform:"rotate(45deg) translateX(".concat((0,x.bf)(e.calc(b).mul(-1).equal()),")")}},["".concat(n,"-submenu-open").concat(n,"-submenu-inline > ").concat(n,"-submenu-title > ").concat(n,"-submenu-arrow")]:{transform:"translateY(".concat((0,x.bf)(e.calc(g).mul(.2).mul(-1).equal()),")"),"&::after":{transform:"rotate(-45deg) translateX(".concat((0,x.bf)(e.calc(b).mul(-1).equal()),")")},"&::before":{transform:"rotate(45deg) translateX(".concat((0,x.bf)(b),")")}}})},{["".concat(t,"-layout-header")]:{[n]:{lineHeight:"inherit"}}}]},L=e=>{var t,n,o;let{colorPrimary:c,colorError:a,colorTextDisabled:r,colorErrorBg:l,colorText:i,colorTextDescription:s,colorBgContainer:d,colorFillAlter:u,colorFillContent:m,lineWidth:p,lineWidthBold:g,controlItemBgActive:b,colorBgTextHover:f,controlHeightLG:v,lineHeight:h,colorBgElevated:y,marginXXS:w,padding:C,fontSize:I,controlHeightSM:O,fontSizeLG:x,colorTextLightSolid:B,colorErrorHover:j}=e,k=null!==(t=e.activeBarWidth)&&void 0!==t?t:0,E=null!==(n=e.activeBarBorderWidth)&&void 0!==n?n:p,N=null!==(o=e.itemMarginInline)&&void 0!==o?o:e.marginXXS,z=new S.C(B).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:c,horizontalItemHoverColor:c,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:c,itemSelectedColor:c,colorItemTextSelectedHorizontal:c,horizontalItemSelectedColor:c,colorItemBg:d,itemBg:d,colorItemBgHover:f,itemHoverBg:f,colorItemBgActive:m,itemActiveBg:b,colorSubItemBg:u,subMenuItemBg:u,colorItemBgSelected:b,itemSelectedBg:b,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:k,colorActiveBarHeight:g,activeBarHeight:g,colorActiveBarBorderSize:p,activeBarBorderWidth:E,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:N,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:v,groupTitleLineHeight:h,collapsedWidth:2*v,popupBg:y,itemMarginBlock:w,itemPaddingInline:C,horizontalLineHeight:"".concat(1.15*v,"px"),iconSize:I,iconMarginInlineEnd:O-I,collapsedIconSize:x,groupTitleFontSize:I,darkItemDisabledColor:new S.C(B).setAlpha(.25).toRgbString(),darkItemColor:z,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:B,darkItemSelectedBg:c,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:z,darkItemHoverColor:B,darkDangerItemHoverColor:j,darkDangerItemSelectedColor:B,darkDangerItemActiveBg:a,itemWidth:k?"calc(100% + ".concat(E,"px)"):"calc(100% - ".concat(2*N,"px)")}};var X=n(64024),_=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let q=(0,o.forwardRef)((e,t)=>{var n,a;let l;let g=o.useContext(O.Z),f=g||{},{getPrefixCls:v,getPopupContainer:w,direction:x,menu:S}=o.useContext(p.E_),B=v(),{prefixCls:T,className:Z,style:M,theme:D="light",expandIcon:q,_internalDisableMenuItemTitleTooltip:F,inlineCollapsed:Y,siderCollapsed:G,items:$,children:U,rootClassName:V,mode:J,selectable:Q,onClick:K,overflowedIndicatorPopupClassName:ee}=e,et=_(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),en=(0,d.Z)(et,["collapsedWidth"]),eo=o.useMemo(()=>$?function e(t){return(t||[]).map((t,n)=>{if(t&&"object"==typeof t){let{label:a,children:r,key:l,type:i}=t,s=I(t,["label","children","key","type"]),d=null!=l?l:"tmp-".concat(n);return r||"group"===i?"group"===i?o.createElement(c.BW,Object.assign({key:d},s,{title:a}),e(r)):o.createElement(C,Object.assign({key:d},s,{title:a}),e(r)):"divider"===i?o.createElement(b,Object.assign({key:d},s)):o.createElement(y,Object.assign({key:d},s),a)}return null}).filter(e=>e)}($):$,[$])||U;null===(n=f.validator)||void 0===n||n.call(f,{mode:J});let ec=(0,s.zX)(function(){var e;null==K||K.apply(void 0,arguments),null===(e=f.onClick)||void 0===e||e.call(f)}),ea=f.mode||J,er=null!=Q?Q:f.selectable,el=o.useMemo(()=>void 0!==G?G:Y,[Y,G]),ei={horizontal:{motionName:"".concat(B,"-slide-up")},inline:(0,u.Z)(B),other:{motionName:"".concat(B,"-zoom-big")}},es=v("menu",T||f.prefixCls),ed=(0,X.Z)(es),[eu,em,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,N.I$)("Menu",e=>{let{colorBgElevated:t,colorPrimary:n,colorTextLightSolid:o,controlHeightLG:c,fontSize:a,darkItemColor:r,darkDangerItemColor:l,darkItemBg:i,darkSubMenuItemBg:s,darkItemSelectedColor:d,darkItemSelectedBg:u,darkDangerItemSelectedBg:m,darkItemHoverBg:p,darkGroupTitleColor:g,darkItemHoverColor:b,darkItemDisabledColor:f,darkDangerItemHoverColor:v,darkDangerItemSelectedColor:h,darkDangerItemActiveBg:y,popupBg:w,darkPopupBg:C}=e,I=e.calc(a).div(7).mul(5).equal(),O=(0,z.TS)(e,{menuArrowSize:I,menuHorizontalHeight:e.calc(c).mul(1.15).equal(),menuArrowOffset:e.calc(I).mul(.25).equal(),menuPanelMaskInset:-7,menuSubMenuBg:t,calc:e.calc,popupBg:w}),x=(0,z.TS)(O,{itemColor:r,itemHoverColor:b,groupTitleColor:g,itemSelectedColor:d,itemBg:i,popupBg:C,subMenuItemBg:s,itemActiveBg:"transparent",itemSelectedBg:u,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:p,itemDisabledColor:f,dangerItemColor:l,dangerItemHoverColor:v,dangerItemSelectedColor:h,dangerItemActiveBg:y,dangerItemSelectedBg:m,menuSubMenuBg:s,horizontalItemSelectedColor:o,horizontalItemSelectedBg:n});return[W(O),H(O),A(O),R(O,"light"),R(x,"dark"),P(O),(0,j.Z)(O),(0,k.oN)(O,"slide-up"),(0,k.oN)(O,"slide-down"),(0,E._y)(O,"zoom-big")]},L,{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,ed,!g),eg=i()("".concat(es,"-").concat(D),null==S?void 0:S.className,Z);if("function"==typeof q)l=q;else if(null===q||!1===q)l=null;else if(null===f.expandIcon||!1===f.expandIcon)l=null;else{let e=null!=q?q:f.expandIcon;l=(0,m.Tm)(e,{className:i()("".concat(es,"-submenu-expand-icon"),(0,m.l$)(e)?null===(a=e.props)||void 0===a?void 0:a.className:"")})}let eb=o.useMemo(()=>({prefixCls:es,inlineCollapsed:el||!1,direction:x,firstLevel:!0,theme:D,mode:ea,disableMenuItemTitleTooltip:F}),[es,el,x,F,D]);return eu(o.createElement(O.Z.Provider,{value:null},o.createElement(h.Provider,{value:eb},o.createElement(c.ZP,Object.assign({getPopupContainer:w,overflowedIndicator:o.createElement(r.Z,null),overflowedIndicatorPopupClassName:i()(es,"".concat(es,"-").concat(D),ee),mode:ea,selectable:er,onClick:ec},en,{inlineCollapsed:el,style:Object.assign(Object.assign({},null==S?void 0:S.style),M),className:eg,prefixCls:es,direction:x,defaultMotions:ei,expandIcon:l,ref:t,rootClassName:i()(V,em,f.rootClassName,ep,ed)}),eo))))}),F=(0,o.forwardRef)((e,t)=>{let n=(0,o.useRef)(null),c=o.useContext(a.D);return(0,o.useImperativeHandle)(t,()=>({menu:n.current,focus:e=>{var t;null===(t=n.current)||void 0===t||t.focus(e)}})),o.createElement(q,Object.assign({ref:n},e,c))});F.Item=y,F.SubMenu=C,F.Divider=b,F.ItemGroup=c.BW;var Y=F},93142:function(e,t,n){n.d(t,{Z:function(){return v}});var o=n(2265),c=n(36760),a=n.n(c),r=n(45287);function l(e){return["small","middle","large"].includes(e)}function i(e){return!!e&&"number"==typeof e&&!Number.isNaN(e)}var s=n(71744),d=n(65658);let u=o.createContext({latestIndex:0}),m=u.Provider;var p=e=>{let{className:t,index:n,children:c,split:a,style:r}=e,{latestIndex:l}=o.useContext(u);return null==c?null:o.createElement(o.Fragment,null,o.createElement("div",{className:t,style:r},c),nt.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var c=0,o=Object.getOwnPropertySymbols(e);ct.indexOf(o[c])&&Object.prototype.propertyIsEnumerable.call(e,o[c])&&(n[o[c]]=e[o[c]]);return n};let f=o.forwardRef((e,t)=>{var n,c;let{getPrefixCls:d,space:u,direction:f}=o.useContext(s.E_),{size:v=(null==u?void 0:u.size)||"small",align:h,className:y,rootClassName:w,children:C,direction:I="horizontal",prefixCls:O,split:x,style:S,wrap:B=!1,classNames:j,styles:k}=e,E=b(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[N,z]=Array.isArray(v)?v:[v,v],H=l(z),P=l(N),T=i(z),R=i(N),Z=(0,r.Z)(C,{keepEmpty:!0}),A=void 0===h&&"horizontal"===I?"center":h,M=d("space",O),[D,W,L]=(0,g.Z)(M),X=a()(M,null==u?void 0:u.className,W,"".concat(M,"-").concat(I),{["".concat(M,"-rtl")]:"rtl"===f,["".concat(M,"-align-").concat(A)]:A,["".concat(M,"-gap-row-").concat(z)]:H,["".concat(M,"-gap-col-").concat(N)]:P},y,w,L),_=a()("".concat(M,"-item"),null!==(n=null==j?void 0:j.item)&&void 0!==n?n:null===(c=null==u?void 0:u.classNames)||void 0===c?void 0:c.item),q=0,F=Z.map((e,t)=>{var n,c;null!=e&&(q=t);let a=e&&e.key||"".concat(_,"-").concat(t);return o.createElement(p,{className:_,key:a,index:t,split:x,style:null!==(n=null==k?void 0:k.item)&&void 0!==n?n:null===(c=null==u?void 0:u.styles)||void 0===c?void 0:c.item},e)}),Y=o.useMemo(()=>({latestIndex:q}),[q]);if(0===Z.length)return null;let G={};return B&&(G.flexWrap="wrap"),!P&&R&&(G.columnGap=N),!H&&T&&(G.rowGap=z),D(o.createElement("div",Object.assign({ref:t,className:X,style:Object.assign(Object.assign(Object.assign({},G),null==u?void 0:u.style),S)},E),o.createElement(m,{value:Y},F)))});f.Compact=d.ZP;var v=f},79205:function(e,t,n){n.d(t,{Z:function(){return u}});var o=n(2265);let c=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),a=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),r=e=>{let t=a(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=function(){for(var e=arguments.length,t=Array(e),n=0;n!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()},i=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var s={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let d=(0,o.forwardRef)((e,t)=>{let{color:n="currentColor",size:c=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:d="",children:u,iconNode:m,...p}=e;return(0,o.createElement)("svg",{ref:t,...s,width:c,height:c,stroke:n,strokeWidth:r?24*Number(a)/Number(c):a,className:l("lucide",d),...!u&&!i(p)&&{"aria-hidden":"true"},...p},[...m.map(e=>{let[t,n]=e;return(0,o.createElement)(t,n)}),...Array.isArray(u)?u:[u]])}),u=(e,t)=>{let n=(0,o.forwardRef)((n,a)=>{let{className:i,...s}=n;return(0,o.createElement)(d,{ref:a,iconNode:t,className:l("lucide-".concat(c(r(e))),"lucide-".concat(e),i),...s})});return n.displayName=r(e),n}}}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/api-playground/page-3b079cf238dc3033.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/api-playground/page-8a2aa7f525189deb.js similarity index 97% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/api-playground/page-3b079cf238dc3033.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/api-playground/page-8a2aa7f525189deb.js index ce8ea3f9631..53ea439abcb 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/api-playground/page-3b079cf238dc3033.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/api-playground/page-8a2aa7f525189deb.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3425],{52235:function(e,r,n){Promise.resolve().then(n.bind(n,16643))},23639:function(e,r,n){"use strict";n.d(r,{Z:function(){return a}});var t=n(1119),o=n(2265),s={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"},i=n(55015),a=o.forwardRef(function(e,r){return o.createElement(i.Z,(0,t.Z)({},e,{ref:r,icon:s}))})},96761:function(e,r,n){"use strict";n.d(r,{Z:function(){return l}});var t=n(5853),o=n(26898),s=n(97324),i=n(1153),a=n(2265);let l=a.forwardRef((e,r)=>{let{color:n,children:l,className:c}=e,d=(0,t._T)(e,["color","children","className"]);return a.createElement("p",Object.assign({ref:r,className:(0,s.q)("font-medium text-tremor-title",n?(0,i.bM)(n,o.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),l)});l.displayName="Title"},26898:function(e,r,n){"use strict";n.d(r,{K:function(){return o},s:function(){return s}});var t=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},s=[t.fr.Blue,t.fr.Cyan,t.fr.Sky,t.fr.Indigo,t.fr.Violet,t.fr.Purple,t.fr.Fuchsia,t.fr.Slate,t.fr.Gray,t.fr.Zinc,t.fr.Neutral,t.fr.Stone,t.fr.Red,t.fr.Orange,t.fr.Amber,t.fr.Yellow,t.fr.Lime,t.fr.Green,t.fr.Emerald,t.fr.Teal,t.fr.Pink,t.fr.Rose]},16643:function(e,r,n){"use strict";n.r(r);var t=n(57437),o=n(6674),s=n(39760);r.default=()=>{let{accessToken:e}=(0,s.Z)();return(0,t.jsx)(o.Z,{accessToken:e})}},39760:function(e,r,n){"use strict";var t=n(2265),o=n(99376),s=n(14474),i=n(3914);r.Z=()=>{var e,r,n,a,l,c,d;let u=(0,o.useRouter)(),p="undefined"!=typeof document?(0,i.e)("token"):null;(0,t.useEffect)(()=>{p||u.replace("/sso/key/generate")},[p,u]);let f=(0,t.useMemo)(()=>{if(!p)return null;try{return(0,s.o)(p)}catch(e){return(0,i.b)(),u.replace("/sso/key/generate"),null}},[p,u]);return{token:p,accessToken:null!==(e=null==f?void 0:f.key)&&void 0!==e?e:null,userId:null!==(r=null==f?void 0:f.user_id)&&void 0!==r?r:null,userEmail:null!==(n=null==f?void 0:f.user_email)&&void 0!==n?n:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==f?void 0:f.user_role)&&void 0!==a?a:null),premiumUser:null!==(l=null==f?void 0:f.premium_user)&&void 0!==l?l:null,disabledPersonalKeyCreation:null!==(c=null==f?void 0:f.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==f?void 0:f.login_method)==="username_password"}}},6674:function(e,r,n){"use strict";n.d(r,{Z:function(){return d}});var t=n(57437),o=n(2265),s=n(73002),i=n(23639),a=n(96761),l=n(19250),c=n(9114),d=e=>{let{accessToken:r}=e,[n,d]=(0,o.useState)('{\n "model": "openai/gpt-4o",\n "messages": [\n {\n "role": "system",\n "content": "You are a helpful assistant."\n },\n {\n "role": "user",\n "content": "Explain quantum computing in simple terms"\n }\n ],\n "temperature": 0.7,\n "max_tokens": 500,\n "stream": true\n}'),[u,p]=(0,o.useState)(""),[f,m]=(0,o.useState)(!1),h=(e,r,n)=>{let t=JSON.stringify(r,null,2).split("\n").map(e=>" ".concat(e)).join("\n"),o=Object.entries(n).map(e=>{let[r,n]=e;return"-H '".concat(r,": ").concat(n,"'")}).join(" \\\n ");return"curl -X POST \\\n ".concat(e," \\\n ").concat(o?"".concat(o," \\\n "):"","-H 'Content-Type: application/json' \\\n -d '{\n").concat(t,"\n }'")},x=async()=>{m(!0);try{let e;try{e=JSON.parse(n)}catch(e){c.Z.fromBackend("Invalid JSON in request body"),m(!1);return}let t={call_type:"completion",request_body:e};if(!r){c.Z.fromBackend("No access token found"),m(!1);return}let o=await (0,l.transformRequestCall)(r,t);if(o.raw_request_api_base&&o.raw_request_body){let e=h(o.raw_request_api_base,o.raw_request_body,o.raw_request_headers||{});p(e),c.Z.success("Request transformed successfully")}else{let e="string"==typeof o?o:JSON.stringify(o);p(e),c.Z.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),c.Z.fromBackend("Failed to transform request")}finally{m(!1)}};return(0,t.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,t.jsx)(a.Z,{children:"Playground"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,t.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:n,onChange:e=>d(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),x())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,t.jsxs)(s.ZP,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:x,loading:f,children:[(0,t.jsx)("span",{children:"Transform"}),(0,t.jsx)("span",{children:"→"})]})})]}),(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,t.jsx)("br",{}),(0,t.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,t.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:u||'curl -X POST \\\n https://api.openai.com/v1/chat/completions \\\n -H \'Authorization: Bearer sk-xxx\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "model": "gpt-4",\n "messages": [\n {\n "role": "system",\n "content": "You are a helpful assistant."\n }\n ],\n "temperature": 0.7\n }\''}),(0,t.jsx)(s.ZP,{type:"text",icon:(0,t.jsx)(i.Z,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(u||""),c.Z.success("Copied to clipboard")}})]})]})]}),(0,t.jsx)("div",{className:"mt-4 text-right w-full",children:(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}},14474:function(e,r,n){"use strict";n.d(r,{o:function(){return o}});class t extends Error{}function o(e,r){let n;if("string"!=typeof e)throw new t("Invalid token specified: must be a string");r||(r={});let o=!0===r.header?0:1,s=e.split(".")[o];if("string"!=typeof s)throw new t(`Invalid token specified: missing part #${o+1}`);try{n=function(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw Error("base64 string is not of the correct length")}try{var n;return n=r,decodeURIComponent(atob(n).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return atob(r)}}(s)}catch(e){throw new t(`Invalid token specified: invalid base64 for part #${o+1} (${e.message})`)}try{return JSON.parse(n)}catch(e){throw new t(`Invalid token specified: invalid json for part #${o+1} (${e.message})`)}}t.prototype.name="InvalidTokenError"}},function(e){e.O(0,[1114,1491,8049,2971,2117,1744],function(){return e(e.s=52235)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3425],{52235:function(e,r,n){Promise.resolve().then(n.bind(n,16643))},23639:function(e,r,n){"use strict";n.d(r,{Z:function(){return a}});var t=n(1119),o=n(2265),s={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"},i=n(55015),a=o.forwardRef(function(e,r){return o.createElement(i.Z,(0,t.Z)({},e,{ref:r,icon:s}))})},96761:function(e,r,n){"use strict";n.d(r,{Z:function(){return l}});var t=n(5853),o=n(26898),s=n(97324),i=n(1153),a=n(2265);let l=a.forwardRef((e,r)=>{let{color:n,children:l,className:c}=e,d=(0,t._T)(e,["color","children","className"]);return a.createElement("p",Object.assign({ref:r,className:(0,s.q)("font-medium text-tremor-title",n?(0,i.bM)(n,o.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",c)},d),l)});l.displayName="Title"},26898:function(e,r,n){"use strict";n.d(r,{K:function(){return o},s:function(){return s}});var t=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},s=[t.fr.Blue,t.fr.Cyan,t.fr.Sky,t.fr.Indigo,t.fr.Violet,t.fr.Purple,t.fr.Fuchsia,t.fr.Slate,t.fr.Gray,t.fr.Zinc,t.fr.Neutral,t.fr.Stone,t.fr.Red,t.fr.Orange,t.fr.Amber,t.fr.Yellow,t.fr.Lime,t.fr.Green,t.fr.Emerald,t.fr.Teal,t.fr.Pink,t.fr.Rose]},16643:function(e,r,n){"use strict";n.r(r);var t=n(57437),o=n(6674),s=n(80443);r.default=()=>{let{accessToken:e}=(0,s.Z)();return(0,t.jsx)(o.Z,{accessToken:e})}},80443:function(e,r,n){"use strict";var t=n(2265),o=n(99376),s=n(14474),i=n(3914);r.Z=()=>{var e,r,n,a,l,c,d;let u=(0,o.useRouter)(),p="undefined"!=typeof document?(0,i.e)("token"):null;(0,t.useEffect)(()=>{p||u.replace("/sso/key/generate")},[p,u]);let f=(0,t.useMemo)(()=>{if(!p)return null;try{return(0,s.o)(p)}catch(e){return(0,i.b)(),u.replace("/sso/key/generate"),null}},[p,u]);return{token:p,accessToken:null!==(e=null==f?void 0:f.key)&&void 0!==e?e:null,userId:null!==(r=null==f?void 0:f.user_id)&&void 0!==r?r:null,userEmail:null!==(n=null==f?void 0:f.user_email)&&void 0!==n?n:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==f?void 0:f.user_role)&&void 0!==a?a:null),premiumUser:null!==(l=null==f?void 0:f.premium_user)&&void 0!==l?l:null,disabledPersonalKeyCreation:null!==(c=null==f?void 0:f.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==f?void 0:f.login_method)==="username_password"}}},6674:function(e,r,n){"use strict";n.d(r,{Z:function(){return d}});var t=n(57437),o=n(2265),s=n(73002),i=n(23639),a=n(96761),l=n(19250),c=n(9114),d=e=>{let{accessToken:r}=e,[n,d]=(0,o.useState)('{\n "model": "openai/gpt-4o",\n "messages": [\n {\n "role": "system",\n "content": "You are a helpful assistant."\n },\n {\n "role": "user",\n "content": "Explain quantum computing in simple terms"\n }\n ],\n "temperature": 0.7,\n "max_tokens": 500,\n "stream": true\n}'),[u,p]=(0,o.useState)(""),[f,m]=(0,o.useState)(!1),h=(e,r,n)=>{let t=JSON.stringify(r,null,2).split("\n").map(e=>" ".concat(e)).join("\n"),o=Object.entries(n).map(e=>{let[r,n]=e;return"-H '".concat(r,": ").concat(n,"'")}).join(" \\\n ");return"curl -X POST \\\n ".concat(e," \\\n ").concat(o?"".concat(o," \\\n "):"","-H 'Content-Type: application/json' \\\n -d '{\n").concat(t,"\n }'")},x=async()=>{m(!0);try{let e;try{e=JSON.parse(n)}catch(e){c.Z.fromBackend("Invalid JSON in request body"),m(!1);return}let t={call_type:"completion",request_body:e};if(!r){c.Z.fromBackend("No access token found"),m(!1);return}let o=await (0,l.transformRequestCall)(r,t);if(o.raw_request_api_base&&o.raw_request_body){let e=h(o.raw_request_api_base,o.raw_request_body,o.raw_request_headers||{});p(e),c.Z.success("Request transformed successfully")}else{let e="string"==typeof o?o:JSON.stringify(o);p(e),c.Z.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),c.Z.fromBackend("Failed to transform request")}finally{m(!1)}};return(0,t.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,t.jsx)(a.Z,{children:"Playground"}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,t.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,t.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:n,onChange:e=>d(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),x())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,t.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,t.jsxs)(s.ZP,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:x,loading:f,children:[(0,t.jsx)("span",{children:"Transform"}),(0,t.jsx)("span",{children:"→"})]})})]}),(0,t.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,t.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,t.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,t.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,t.jsx)("br",{}),(0,t.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,t.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,t.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:u||'curl -X POST \\\n https://api.openai.com/v1/chat/completions \\\n -H \'Authorization: Bearer sk-xxx\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "model": "gpt-4",\n "messages": [\n {\n "role": "system",\n "content": "You are a helpful assistant."\n }\n ],\n "temperature": 0.7\n }\''}),(0,t.jsx)(s.ZP,{type:"text",icon:(0,t.jsx)(i.Z,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(u||""),c.Z.success("Copied to clipboard")}})]})]})]}),(0,t.jsx)("div",{className:"mt-4 text-right w-full",children:(0,t.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}},14474:function(e,r,n){"use strict";n.d(r,{o:function(){return o}});class t extends Error{}function o(e,r){let n;if("string"!=typeof e)throw new t("Invalid token specified: must be a string");r||(r={});let o=!0===r.header?0:1,s=e.split(".")[o];if("string"!=typeof s)throw new t(`Invalid token specified: missing part #${o+1}`);try{n=function(e){let r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw Error("base64 string is not of the correct length")}try{var n;return n=r,decodeURIComponent(atob(n).replace(/(.)/g,(e,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(e){return atob(r)}}(s)}catch(e){throw new t(`Invalid token specified: invalid base64 for part #${o+1} (${e.message})`)}try{return JSON.parse(n)}catch(e){throw new t(`Invalid token specified: invalid json for part #${o+1} (${e.message})`)}}t.prototype.name="InvalidTokenError"}},function(e){e.O(0,[1114,1491,8049,2971,2117,1744],function(){return e(e.s=52235)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/budgets/page-311e40f543030711.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/budgets/page-68dbc026f1363c67.js similarity index 98% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/budgets/page-311e40f543030711.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/budgets/page-68dbc026f1363c67.js index f67da1ead9b..c137d4621a4 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/budgets/page-311e40f543030711.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/budgets/page-68dbc026f1363c67.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5649],{54501:function(e,n,l){Promise.resolve().then(l.bind(l,78858))},78858:function(e,n,l){"use strict";l.r(n);var t=l(57437),s=l(49104),i=l(39760);n.default=()=>{let{accessToken:e}=(0,i.Z)();return(0,t.jsx)(s.Z,{accessToken:e})}},39760:function(e,n,l){"use strict";var t=l(2265),s=l(99376),i=l(14474),r=l(3914);n.Z=()=>{var e,n,l,a,d,u,o;let c=(0,s.useRouter)(),m="undefined"!=typeof document?(0,r.e)("token"):null;(0,t.useEffect)(()=>{m||c.replace("/sso/key/generate")},[m,c]);let h=(0,t.useMemo)(()=>{if(!m)return null;try{return(0,i.o)(m)}catch(e){return(0,r.b)(),c.replace("/sso/key/generate"),null}},[m,c]);return{token:m,accessToken:null!==(e=null==h?void 0:h.key)&&void 0!==e?e:null,userId:null!==(n=null==h?void 0:h.user_id)&&void 0!==n?n:null,userEmail:null!==(l=null==h?void 0:h.user_email)&&void 0!==l?l:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==h?void 0:h.user_role)&&void 0!==a?a:null),premiumUser:null!==(d=null==h?void 0:h.premium_user)&&void 0!==d?d:null,disabledPersonalKeyCreation:null!==(u=null==h?void 0:h.disabled_non_admin_personal_key_creation)&&void 0!==u?u:null,showSSOBanner:(null==h?void 0:h.login_method)==="username_password"}}},49104:function(e,n,l){"use strict";l.d(n,{Z:function(){return F}});var t=l(57437),s=l(2265),i=l(87452),r=l(88829),a=l(72208),d=l(49566),u=l(13634),o=l(82680),c=l(20577),m=l(52787),h=l(73002),p=l(19250),x=l(9114),g=e=>{let{isModalVisible:n,accessToken:l,setIsModalVisible:s,setBudgetList:g}=e,[j]=u.Z.useForm(),Z=async e=>{if(null!=l&&void 0!=l)try{x.Z.info("Making API Call");let n=await (0,p.budgetCreateCall)(l,e);console.log("key create Response:",n),g(e=>e?[...e,n]:[n]),x.Z.success("Budget Created"),j.resetFields()}catch(e){console.error("Error creating the key:",e),x.Z.fromBackend("Error creating the key: ".concat(e))}};return(0,t.jsx)(o.Z,{title:"Create Budget",visible:n,width:800,footer:null,onOk:()=>{s(!1),j.resetFields()},onCancel:()=>{s(!1),j.resetFields()},children:(0,t.jsxs)(u.Z,{form:j,onFinish:Z,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.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,t.jsx)(d.Z,{placeholder:""})}),(0,t.jsx)(u.Z.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(c.Z,{step:1,precision:2,width:200})}),(0,t.jsx)(u.Z.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(c.Z,{step:1,precision:2,width:200})}),(0,t.jsxs)(i.Z,{className:"mt-20 mb-8",children:[(0,t.jsx)(a.Z,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(r.Z,{children:[(0,t.jsx)(u.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(c.Z,{step:.01,precision:2,width:200})}),(0,t.jsx)(u.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(m.default,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(m.default.Option,{value:"24h",children:"daily"}),(0,t.jsx)(m.default.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(m.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(h.ZP,{htmlType:"submit",children:"Create Budget"})})]})})},j=e=>{let{isModalVisible:n,accessToken:l,setIsModalVisible:g,setBudgetList:j,existingBudget:Z,handleUpdateCall:_}=e;console.log("existingBudget",Z);let[b]=u.Z.useForm();(0,s.useEffect)(()=>{b.setFieldsValue(Z)},[Z,b]);let f=async e=>{if(null!=l&&void 0!=l)try{x.Z.info("Making API Call"),g(!0);let n=await (0,p.budgetUpdateCall)(l,e);j(e=>e?[...e,n]:[n]),x.Z.success("Budget Updated"),b.resetFields(),_()}catch(e){console.error("Error creating the key:",e),x.Z.fromBackend("Error creating the key: ".concat(e))}};return(0,t.jsx)(o.Z,{title:"Edit Budget",visible:n,width:800,footer:null,onOk:()=>{g(!1),b.resetFields()},onCancel:()=>{g(!1),b.resetFields()},children:(0,t.jsxs)(u.Z,{form:b,onFinish:f,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:Z,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.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,t.jsx)(d.Z,{placeholder:""})}),(0,t.jsx)(u.Z.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(c.Z,{step:1,precision:2,width:200})}),(0,t.jsx)(u.Z.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(c.Z,{step:1,precision:2,width:200})}),(0,t.jsxs)(i.Z,{className:"mt-20 mb-8",children:[(0,t.jsx)(a.Z,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(r.Z,{children:[(0,t.jsx)(u.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(c.Z,{step:.01,precision:2,width:200})}),(0,t.jsx)(u.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(m.default,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(m.default.Option,{value:"24h",children:"daily"}),(0,t.jsx)(m.default.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(m.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(h.ZP,{htmlType:"submit",children:"Save"})})]})})},Z=l(20831),_=l(12514),b=l(47323),f=l(12485),y=l(18135),v=l(35242),k=l(29706),w=l(77991),C=l(21626),B=l(97214),I=l(28241),D=l(58834),A=l(69552),O=l(71876),T=l(84264),E=l(53410),M=l(74998),S=l(17906),F=e=>{let{accessToken:n}=e,[l,i]=(0,s.useState)(!1),[r,a]=(0,s.useState)(!1),[d,u]=(0,s.useState)(null),[o,c]=(0,s.useState)([]);(0,s.useEffect)(()=>{n&&(0,p.getBudgetList)(n).then(e=>{c(e)})},[n]);let m=async(e,l)=>{console.log("budget_id",e),null!=n&&(u(o.find(n=>n.budget_id===e)||null),a(!0))},h=async(e,l)=>{if(null==n)return;x.Z.info("Request made"),await (0,p.budgetDeleteCall)(n,e);let t=[...o];t.splice(l,1),c(t),x.Z.success("Budget Deleted.")},F=async()=>{null!=n&&(0,p.getBudgetList)(n).then(e=>{c(e)})};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(Z.Z,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>i(!0),children:"+ Create Budget"}),(0,t.jsx)(g,{accessToken:n,isModalVisible:l,setIsModalVisible:i,setBudgetList:c}),d&&(0,t.jsx)(j,{accessToken:n,isModalVisible:r,setIsModalVisible:a,setBudgetList:c,existingBudget:d,handleUpdateCall:F}),(0,t.jsxs)(_.Z,{children:[(0,t.jsx)(T.Z,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(C.Z,{children:[(0,t.jsx)(D.Z,{children:(0,t.jsxs)(O.Z,{children:[(0,t.jsx)(A.Z,{children:"Budget ID"}),(0,t.jsx)(A.Z,{children:"Max Budget"}),(0,t.jsx)(A.Z,{children:"TPM"}),(0,t.jsx)(A.Z,{children:"RPM"})]})}),(0,t.jsx)(B.Z,{children:o.slice().sort((e,n)=>new Date(n.updated_at).getTime()-new Date(e.updated_at).getTime()).map((e,n)=>(0,t.jsxs)(O.Z,{children:[(0,t.jsx)(I.Z,{children:e.budget_id}),(0,t.jsx)(I.Z,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(I.Z,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(I.Z,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(b.Z,{icon:E.Z,size:"sm",onClick:()=>m(e.budget_id,n)}),(0,t.jsx)(b.Z,{icon:M.Z,size:"sm",onClick:()=>h(e.budget_id,n)})]},n))})]})]}),(0,t.jsxs)("div",{className:"mt-5",children:[(0,t.jsx)(T.Z,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(y.Z,{children:[(0,t.jsxs)(v.Z,{children:[(0,t.jsx)(f.Z,{children:"Assign Budget to Customer"}),(0,t.jsx)(f.Z,{children:"Test it (Curl)"}),(0,t.jsx)(f.Z,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(w.Z,{children:[(0,t.jsx)(k.Z,{children:(0,t.jsx)(S.Z,{language:"bash",children:"\ncurl -X POST --location '/end_user/new' \n-H 'Authorization: Bearer ' \n-H 'Content-Type: application/json' \n-d '{\"user_id\": \"my-customer-id', \"budget_id\": \"\"}' # \uD83D\uDC48 KEY CHANGE\n\n "})}),(0,t.jsx)(k.Z,{children:(0,t.jsx)(S.Z,{language:"bash",children:'\ncurl -X POST --location \'/chat/completions\' \n-H \'Authorization: Bearer \' \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,t.jsx)(k.Z,{children:(0,t.jsx)(S.Z,{language:"python",children:'from openai import OpenAI\nclient = OpenAI(\n base_url="",\n api_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)'})})]})]})]})]})}}},function(e){e.O(0,[1114,1491,4556,2417,2926,7906,527,8049,2971,2117,1744],function(){return e(e.s=54501)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5649],{54501:function(e,n,l){Promise.resolve().then(l.bind(l,78858))},78858:function(e,n,l){"use strict";l.r(n);var t=l(57437),s=l(49104),i=l(80443);n.default=()=>{let{accessToken:e}=(0,i.Z)();return(0,t.jsx)(s.Z,{accessToken:e})}},80443:function(e,n,l){"use strict";var t=l(2265),s=l(99376),i=l(14474),r=l(3914);n.Z=()=>{var e,n,l,a,d,u,o;let c=(0,s.useRouter)(),m="undefined"!=typeof document?(0,r.e)("token"):null;(0,t.useEffect)(()=>{m||c.replace("/sso/key/generate")},[m,c]);let h=(0,t.useMemo)(()=>{if(!m)return null;try{return(0,i.o)(m)}catch(e){return(0,r.b)(),c.replace("/sso/key/generate"),null}},[m,c]);return{token:m,accessToken:null!==(e=null==h?void 0:h.key)&&void 0!==e?e:null,userId:null!==(n=null==h?void 0:h.user_id)&&void 0!==n?n:null,userEmail:null!==(l=null==h?void 0:h.user_email)&&void 0!==l?l:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==h?void 0:h.user_role)&&void 0!==a?a:null),premiumUser:null!==(d=null==h?void 0:h.premium_user)&&void 0!==d?d:null,disabledPersonalKeyCreation:null!==(u=null==h?void 0:h.disabled_non_admin_personal_key_creation)&&void 0!==u?u:null,showSSOBanner:(null==h?void 0:h.login_method)==="username_password"}}},49104:function(e,n,l){"use strict";l.d(n,{Z:function(){return F}});var t=l(57437),s=l(2265),i=l(87452),r=l(88829),a=l(72208),d=l(49566),u=l(13634),o=l(82680),c=l(20577),m=l(52787),h=l(73002),p=l(19250),x=l(9114),g=e=>{let{isModalVisible:n,accessToken:l,setIsModalVisible:s,setBudgetList:g}=e,[j]=u.Z.useForm(),Z=async e=>{if(null!=l&&void 0!=l)try{x.Z.info("Making API Call");let n=await (0,p.budgetCreateCall)(l,e);console.log("key create Response:",n),g(e=>e?[...e,n]:[n]),x.Z.success("Budget Created"),j.resetFields()}catch(e){console.error("Error creating the key:",e),x.Z.fromBackend("Error creating the key: ".concat(e))}};return(0,t.jsx)(o.Z,{title:"Create Budget",visible:n,width:800,footer:null,onOk:()=>{s(!1),j.resetFields()},onCancel:()=>{s(!1),j.resetFields()},children:(0,t.jsxs)(u.Z,{form:j,onFinish:Z,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.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,t.jsx)(d.Z,{placeholder:""})}),(0,t.jsx)(u.Z.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(c.Z,{step:1,precision:2,width:200})}),(0,t.jsx)(u.Z.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(c.Z,{step:1,precision:2,width:200})}),(0,t.jsxs)(i.Z,{className:"mt-20 mb-8",children:[(0,t.jsx)(a.Z,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(r.Z,{children:[(0,t.jsx)(u.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(c.Z,{step:.01,precision:2,width:200})}),(0,t.jsx)(u.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(m.default,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(m.default.Option,{value:"24h",children:"daily"}),(0,t.jsx)(m.default.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(m.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(h.ZP,{htmlType:"submit",children:"Create Budget"})})]})})},j=e=>{let{isModalVisible:n,accessToken:l,setIsModalVisible:g,setBudgetList:j,existingBudget:Z,handleUpdateCall:_}=e;console.log("existingBudget",Z);let[b]=u.Z.useForm();(0,s.useEffect)(()=>{b.setFieldsValue(Z)},[Z,b]);let f=async e=>{if(null!=l&&void 0!=l)try{x.Z.info("Making API Call"),g(!0);let n=await (0,p.budgetUpdateCall)(l,e);j(e=>e?[...e,n]:[n]),x.Z.success("Budget Updated"),b.resetFields(),_()}catch(e){console.error("Error creating the key:",e),x.Z.fromBackend("Error creating the key: ".concat(e))}};return(0,t.jsx)(o.Z,{title:"Edit Budget",visible:n,width:800,footer:null,onOk:()=>{g(!1),b.resetFields()},onCancel:()=>{g(!1),b.resetFields()},children:(0,t.jsxs)(u.Z,{form:b,onFinish:f,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:Z,children:[(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.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,t.jsx)(d.Z,{placeholder:""})}),(0,t.jsx)(u.Z.Item,{label:"Max Tokens per minute",name:"tpm_limit",help:"Default is model limit.",children:(0,t.jsx)(c.Z,{step:1,precision:2,width:200})}),(0,t.jsx)(u.Z.Item,{label:"Max Requests per minute",name:"rpm_limit",help:"Default is model limit.",children:(0,t.jsx)(c.Z,{step:1,precision:2,width:200})}),(0,t.jsxs)(i.Z,{className:"mt-20 mb-8",children:[(0,t.jsx)(a.Z,{children:(0,t.jsx)("b",{children:"Optional Settings"})}),(0,t.jsxs)(r.Z,{children:[(0,t.jsx)(u.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,t.jsx)(c.Z,{step:.01,precision:2,width:200})}),(0,t.jsx)(u.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,t.jsxs)(m.default,{defaultValue:null,placeholder:"n/a",children:[(0,t.jsx)(m.default.Option,{value:"24h",children:"daily"}),(0,t.jsx)(m.default.Option,{value:"7d",children:"weekly"}),(0,t.jsx)(m.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(h.ZP,{htmlType:"submit",children:"Save"})})]})})},Z=l(20831),_=l(12514),b=l(47323),f=l(12485),y=l(18135),v=l(35242),k=l(29706),w=l(77991),C=l(21626),B=l(97214),I=l(28241),D=l(58834),A=l(69552),O=l(71876),T=l(84264),E=l(53410),M=l(74998),S=l(17906),F=e=>{let{accessToken:n}=e,[l,i]=(0,s.useState)(!1),[r,a]=(0,s.useState)(!1),[d,u]=(0,s.useState)(null),[o,c]=(0,s.useState)([]);(0,s.useEffect)(()=>{n&&(0,p.getBudgetList)(n).then(e=>{c(e)})},[n]);let m=async(e,l)=>{console.log("budget_id",e),null!=n&&(u(o.find(n=>n.budget_id===e)||null),a(!0))},h=async(e,l)=>{if(null==n)return;x.Z.info("Request made"),await (0,p.budgetDeleteCall)(n,e);let t=[...o];t.splice(l,1),c(t),x.Z.success("Budget Deleted.")},F=async()=>{null!=n&&(0,p.getBudgetList)(n).then(e=>{c(e)})};return(0,t.jsxs)("div",{className:"w-full mx-auto flex-auto overflow-y-auto m-8 p-2",children:[(0,t.jsx)(Z.Z,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>i(!0),children:"+ Create Budget"}),(0,t.jsx)(g,{accessToken:n,isModalVisible:l,setIsModalVisible:i,setBudgetList:c}),d&&(0,t.jsx)(j,{accessToken:n,isModalVisible:r,setIsModalVisible:a,setBudgetList:c,existingBudget:d,handleUpdateCall:F}),(0,t.jsxs)(_.Z,{children:[(0,t.jsx)(T.Z,{children:"Create a budget to assign to customers."}),(0,t.jsxs)(C.Z,{children:[(0,t.jsx)(D.Z,{children:(0,t.jsxs)(O.Z,{children:[(0,t.jsx)(A.Z,{children:"Budget ID"}),(0,t.jsx)(A.Z,{children:"Max Budget"}),(0,t.jsx)(A.Z,{children:"TPM"}),(0,t.jsx)(A.Z,{children:"RPM"})]})}),(0,t.jsx)(B.Z,{children:o.slice().sort((e,n)=>new Date(n.updated_at).getTime()-new Date(e.updated_at).getTime()).map((e,n)=>(0,t.jsxs)(O.Z,{children:[(0,t.jsx)(I.Z,{children:e.budget_id}),(0,t.jsx)(I.Z,{children:e.max_budget?e.max_budget:"n/a"}),(0,t.jsx)(I.Z,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,t.jsx)(I.Z,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,t.jsx)(b.Z,{icon:E.Z,size:"sm",onClick:()=>m(e.budget_id,n)}),(0,t.jsx)(b.Z,{icon:M.Z,size:"sm",onClick:()=>h(e.budget_id,n)})]},n))})]})]}),(0,t.jsxs)("div",{className:"mt-5",children:[(0,t.jsx)(T.Z,{className:"text-base",children:"How to use budget id"}),(0,t.jsxs)(y.Z,{children:[(0,t.jsxs)(v.Z,{children:[(0,t.jsx)(f.Z,{children:"Assign Budget to Customer"}),(0,t.jsx)(f.Z,{children:"Test it (Curl)"}),(0,t.jsx)(f.Z,{children:"Test it (OpenAI SDK)"})]}),(0,t.jsxs)(w.Z,{children:[(0,t.jsx)(k.Z,{children:(0,t.jsx)(S.Z,{language:"bash",children:"\ncurl -X POST --location '/end_user/new' \n-H 'Authorization: Bearer ' \n-H 'Content-Type: application/json' \n-d '{\"user_id\": \"my-customer-id', \"budget_id\": \"\"}' # \uD83D\uDC48 KEY CHANGE\n\n "})}),(0,t.jsx)(k.Z,{children:(0,t.jsx)(S.Z,{language:"bash",children:'\ncurl -X POST --location \'/chat/completions\' \n-H \'Authorization: Bearer \' \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,t.jsx)(k.Z,{children:(0,t.jsx)(S.Z,{language:"python",children:'from openai import OpenAI\nclient = OpenAI(\n base_url="",\n api_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)'})})]})]})]})]})}}},function(e){e.O(0,[1114,1491,4556,2417,2926,7906,527,8049,2971,2117,1744],function(){return e(e.s=54501)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/caching/page-e8380baac59b7a05.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/caching/page-ec547623c6ed42f2.js similarity index 96% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/caching/page-e8380baac59b7a05.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/caching/page-ec547623c6ed42f2.js index 4289b890c64..16c83acef91 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/caching/page-e8380baac59b7a05.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/caching/page-ec547623c6ed42f2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1979],{90286:function(e,n,t){Promise.resolve().then(t.bind(t,37492))},25512:function(e,n,t){"use strict";t.d(n,{P:function(){return r.Z},Q:function(){return l.Z}});var r=t(27281),l=t(57365)},37492:function(e,n,t){"use strict";t.r(n);var r=t(57437),l=t(66600),i=t(39760);n.default=()=>{let{token:e,accessToken:n,userRole:t,userId:s,premiumUser:a}=(0,i.Z)();return(0,r.jsx)(l.Z,{accessToken:n,token:e,userRole:t,userID:s,premiumUser:a})}},39760:function(e,n,t){"use strict";var r=t(2265),l=t(99376),i=t(14474),s=t(3914);n.Z=()=>{var e,n,t,a,o,u,c;let d=(0,l.useRouter)(),m="undefined"!=typeof document?(0,s.e)("token"):null;(0,r.useEffect)(()=>{m||d.replace("/sso/key/generate")},[m,d]);let f=(0,r.useMemo)(()=>{if(!m)return null;try{return(0,i.o)(m)}catch(e){return(0,s.b)(),d.replace("/sso/key/generate"),null}},[m,d]);return{token:m,accessToken:null!==(e=null==f?void 0:f.key)&&void 0!==e?e:null,userId:null!==(n=null==f?void 0:f.user_id)&&void 0!==n?n:null,userEmail:null!==(t=null==f?void 0:f.user_email)&&void 0!==t?t:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==f?void 0:f.user_role)&&void 0!==a?a:null),premiumUser:null!==(o=null==f?void 0:f.premium_user)&&void 0!==o?o:null,disabledPersonalKeyCreation:null!==(u=null==f?void 0:f.disabled_non_admin_personal_key_creation)&&void 0!==u?u:null,showSSOBanner:(null==f?void 0:f.login_method)==="username_password"}}},39789:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var r=t(57437),l=t(2265),i=t(21487),s=t(84264),a=e=>{let{value:n,onValueChange:t,label:a="Select Time Range",className:o="",showTimeRange:u=!0}=e,[c,d]=(0,l.useState)(!1),m=(0,l.useRef)(null),f=(0,l.useCallback)(e=>{d(!0),setTimeout(()=>d(!1),1500),t(e),requestIdleCallback(()=>{if(e.from){let n;let r={...e},l=new Date(e.from);n=new Date(e.to?e.to:e.from),l.toDateString(),n.toDateString(),l.setHours(0,0,0,0),n.setHours(23,59,59,999),r.from=l,r.to=n,t(r)}},{timeout:100})},[t]),h=(0,l.useCallback)((e,n)=>{if(!e||!n)return"";let t=e=>e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});if(e.toDateString()!==n.toDateString())return"".concat(t(e)," - ").concat(t(n));{let t=e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),r=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),l=n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});return"".concat(t,": ").concat(r," - ").concat(l)}},[]);return(0,r.jsxs)("div",{className:o,children:[a&&(0,r.jsx)(s.Z,{className:"mb-2",children:a}),(0,r.jsxs)("div",{className:"relative w-fit",children:[(0,r.jsx)("div",{ref:m,children:(0,r.jsx)(i.Z,{enableSelect:!0,value:n,onValueChange:f,placeholder:"Select date range",enableClear:!1,style:{zIndex:100}})}),c&&(0,r.jsx)("div",{className:"absolute top-1/2 animate-pulse",style:{left:"calc(100% + 8px)",transform:"translateY(-50%)",zIndex:110},children:(0,r.jsxs)("div",{className:"flex items-center gap-1 text-green-600 text-sm font-medium bg-white px-2 py-1 rounded-full border border-green-200 shadow-sm whitespace-nowrap",children:[(0,r.jsx)("div",{className:"w-3 h-3 bg-green-500 text-white rounded-full flex items-center justify-center text-xs",children:"✓"}),(0,r.jsx)("span",{className:"text-xs",children:"Selected"})]})})]}),u&&n.from&&n.to&&(0,r.jsx)(s.Z,{className:"mt-2 text-xs text-gray-500",children:h(n.from,n.to)})]})}}},function(e){e.O(0,[1114,1491,4556,2926,9678,8714,7281,2344,1487,9632,8049,6600,2971,2117,1744],function(){return e(e.s=90286)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1979],{90286:function(e,n,t){Promise.resolve().then(t.bind(t,37492))},25512:function(e,n,t){"use strict";t.d(n,{P:function(){return r.Z},Q:function(){return l.Z}});var r=t(27281),l=t(57365)},37492:function(e,n,t){"use strict";t.r(n);var r=t(57437),l=t(66600),i=t(80443);n.default=()=>{let{token:e,accessToken:n,userRole:t,userId:s,premiumUser:a}=(0,i.Z)();return(0,r.jsx)(l.Z,{accessToken:n,token:e,userRole:t,userID:s,premiumUser:a})}},80443:function(e,n,t){"use strict";var r=t(2265),l=t(99376),i=t(14474),s=t(3914);n.Z=()=>{var e,n,t,a,o,u,c;let d=(0,l.useRouter)(),m="undefined"!=typeof document?(0,s.e)("token"):null;(0,r.useEffect)(()=>{m||d.replace("/sso/key/generate")},[m,d]);let f=(0,r.useMemo)(()=>{if(!m)return null;try{return(0,i.o)(m)}catch(e){return(0,s.b)(),d.replace("/sso/key/generate"),null}},[m,d]);return{token:m,accessToken:null!==(e=null==f?void 0:f.key)&&void 0!==e?e:null,userId:null!==(n=null==f?void 0:f.user_id)&&void 0!==n?n:null,userEmail:null!==(t=null==f?void 0:f.user_email)&&void 0!==t?t:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==f?void 0:f.user_role)&&void 0!==a?a:null),premiumUser:null!==(o=null==f?void 0:f.premium_user)&&void 0!==o?o:null,disabledPersonalKeyCreation:null!==(u=null==f?void 0:f.disabled_non_admin_personal_key_creation)&&void 0!==u?u:null,showSSOBanner:(null==f?void 0:f.login_method)==="username_password"}}},39789:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var r=t(57437),l=t(2265),i=t(21487),s=t(84264),a=e=>{let{value:n,onValueChange:t,label:a="Select Time Range",className:o="",showTimeRange:u=!0}=e,[c,d]=(0,l.useState)(!1),m=(0,l.useRef)(null),f=(0,l.useCallback)(e=>{d(!0),setTimeout(()=>d(!1),1500),t(e),requestIdleCallback(()=>{if(e.from){let n;let r={...e},l=new Date(e.from);n=new Date(e.to?e.to:e.from),l.toDateString(),n.toDateString(),l.setHours(0,0,0,0),n.setHours(23,59,59,999),r.from=l,r.to=n,t(r)}},{timeout:100})},[t]),h=(0,l.useCallback)((e,n)=>{if(!e||!n)return"";let t=e=>e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});if(e.toDateString()!==n.toDateString())return"".concat(t(e)," - ").concat(t(n));{let t=e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),r=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),l=n.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});return"".concat(t,": ").concat(r," - ").concat(l)}},[]);return(0,r.jsxs)("div",{className:o,children:[a&&(0,r.jsx)(s.Z,{className:"mb-2",children:a}),(0,r.jsxs)("div",{className:"relative w-fit",children:[(0,r.jsx)("div",{ref:m,children:(0,r.jsx)(i.Z,{enableSelect:!0,value:n,onValueChange:f,placeholder:"Select date range",enableClear:!1,style:{zIndex:100}})}),c&&(0,r.jsx)("div",{className:"absolute top-1/2 animate-pulse",style:{left:"calc(100% + 8px)",transform:"translateY(-50%)",zIndex:110},children:(0,r.jsxs)("div",{className:"flex items-center gap-1 text-green-600 text-sm font-medium bg-white px-2 py-1 rounded-full border border-green-200 shadow-sm whitespace-nowrap",children:[(0,r.jsx)("div",{className:"w-3 h-3 bg-green-500 text-white rounded-full flex items-center justify-center text-xs",children:"✓"}),(0,r.jsx)("span",{className:"text-xs",children:"Selected"})]})})]}),u&&n.from&&n.to&&(0,r.jsx)(s.Z,{className:"mt-2 text-xs text-gray-500",children:h(n.from,n.to)})]})}}},function(e){e.O(0,[1114,1491,4556,2926,9678,8714,7281,2344,1487,9632,8049,6600,2971,2117,1744],function(){return e(e.s=90286)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/old-usage/page-f5a50b82a8a92ba7.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/old-usage/page-10a35df60ff1635c.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/old-usage/page-f5a50b82a8a92ba7.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/old-usage/page-10a35df60ff1635c.js index ccdb47ad012..049200b5a59 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/old-usage/page-f5a50b82a8a92ba7.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/old-usage/page-10a35df60ff1635c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[813],{59898:function(e,t,r){Promise.resolve().then(r.bind(r,42954))},47323:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var a=r(5853),n=r(2265),l=r(1526),o=r(7084),s=r(97324),d=r(1153),i=r(26898);let c={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"}},m={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"}},u={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:""}},x=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,d.bM)(t,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,d.bM)(t,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,d.bM)(t,i.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,d.bM)(t,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,d.bM)(t,i.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,d.bM)(t,i.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,s.q)((0,d.bM)(t,i.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,d.bM)(t,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,d.bM)(t,i.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,d.bM)(t,i.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,s.q)((0,d.bM)(t,i.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},h=(0,d.fn)("Icon"),g=n.forwardRef((e,t)=>{let{icon:r,variant:i="simple",tooltip:g,size:b=o.u8.SM,color:p,className:f}=e,k=(0,a._T)(e,["icon","variant","tooltip","size","color","className"]),v=x(i,p),{tooltipProps:w,getReferenceProps:y}=(0,l.l)();return n.createElement("span",Object.assign({ref:(0,d.lq)([t,w.refs.setReference]),className:(0,s.q)(h("root"),"inline-flex flex-shrink-0 items-center",v.bgColor,v.textColor,v.borderColor,v.ringColor,u[i].rounded,u[i].border,u[i].shadow,u[i].ring,c[b].paddingX,c[b].paddingY,f)},y,k),n.createElement(l.Z,Object.assign({text:g},w)),n.createElement(r,{className:(0,s.q)(h("icon"),"shrink-0",m[b].height,m[b].width)}))});g.displayName="Icon"},92414:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var a=r(5853),n=r(2265);r(42698),r(64016),r(8710);var l=r(33232),o=r(44140),s=r(58747);let d=e=>{var t=(0,a._T)(e,[]);return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),n.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 i=r(4537),c=r(9528),m=r(33044);let u=e=>{var t=(0,a._T)(e,[]);return n.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),n.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))};var x=r(97324),h=r(1153),g=r(96398);let b=(0,h.fn)("MultiSelect"),p=n.forwardRef((e,t)=>{let{defaultValue:r,value:h,onValueChange:p,placeholder:f="Select...",placeholderSearch:k="Search",disabled:v=!1,icon:w,children:y,className:N}=e,j=(0,a._T)(e,["defaultValue","value","onValueChange","placeholder","placeholderSearch","disabled","icon","children","className"]),[C,E]=(0,o.Z)(r,h),{reactElementChildren:S,optionsAvailable:_}=(0,n.useMemo)(()=>{let e=n.Children.toArray(y).filter(n.isValidElement);return{reactElementChildren:e,optionsAvailable:(0,g.n0)("",e)}},[y]),[Z,q]=(0,n.useState)(""),M=(null!=C?C:[]).length>0,R=(0,n.useMemo)(()=>Z?(0,g.n0)(Z,S):_,[Z,S,_]),T=()=>{q("")};return n.createElement(c.R,Object.assign({as:"div",ref:t,defaultValue:C,value:C,onChange:e=>{null==p||p(e),E(e)},disabled:v,className:(0,x.q)("w-full min-w-[10rem] relative text-tremor-default",N)},j,{multiple:!0}),e=>{let{value:t}=e;return n.createElement(n.Fragment,null,n.createElement(c.R.Button,{className:(0,x.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,g.um)(t.length>0,v))},w&&n.createElement("span",{className:(0,x.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},n.createElement(w,{className:(0,x.q)(b("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),n.createElement("div",{className:"h-6 flex items-center"},t.length>0?n.createElement("div",{className:"flex flex-nowrap overflow-x-scroll [&::-webkit-scrollbar]:hidden [scrollbar-width:none] gap-x-1 mr-5 -ml-1.5 relative"},_.filter(e=>t.includes(e.props.value)).map((e,r)=>{var a;return n.createElement("div",{key:r,className:(0,x.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")},n.createElement("div",{className:"text-xs truncate "},null!==(a=e.props.children)&&void 0!==a?a:e.props.value),n.createElement("div",{onClick:r=>{r.preventDefault();let a=t.filter(t=>t!==e.props.value);null==p||p(a),E(a)}},n.createElement(u,{className:(0,x.q)(b("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")})))})):n.createElement("span",null,f)),n.createElement("span",{className:(0,x.q)("absolute inset-y-0 right-0 flex items-center mr-2.5")},n.createElement(s.Z,{className:(0,x.q)(b("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),M&&!v?n.createElement("button",{type:"button",className:(0,x.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E([]),null==p||p([])}},n.createElement(i.Z,{className:(0,x.q)(b("clearIconAllItems"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,n.createElement(m.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"},n.createElement(c.R.Options,{className:(0,x.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")},n.createElement("div",{className:(0,x.q)("flex items-center w-full px-2.5","bg-tremor-background-muted","dark:bg-dark-tremor-background-muted")},n.createElement("span",null,n.createElement(d,{className:(0,x.q)("flex-none w-4 h-4 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),n.createElement("input",{name:"search",type:"input",autoComplete:"off",placeholder:k,className:(0,x.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=>q(e.target.value),value:Z})),n.createElement(l.Z.Provider,Object.assign({},{onBlur:{handleResetSearch:T}},{value:{selectedValue:t}}),R))))})});p.displayName="MultiSelect"},46030:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var a=r(5853);r(42698),r(64016),r(8710);var n=r(33232),l=r(2265),o=r(97324),s=r(1153),d=r(9528);let i=(0,s.fn)("MultiSelectItem"),c=l.forwardRef((e,t)=>{let{value:r,className:c,children:m}=e,u=(0,a._T)(e,["value","className","children"]),{selectedValue:x}=(0,l.useContext)(n.Z),h=(0,s.NZ)(r,x);return l.createElement(d.R.Option,Object.assign({className:(0,o.q)(i("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",c),ref:t,key:r,value:r},u),l.createElement("input",{type:"checkbox",className:(0,o.q)(i("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}),l.createElement("span",{className:"whitespace-nowrap truncate"},null!=m?m:r))});c.displayName="MultiSelectItem"},96889:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var a=r(5853),n=r(2265),l=r(26898),o=r(97324),s=r(1153);let d=(0,s.fn)("BarList"),i=n.forwardRef((e,t)=>{var r;let i;let{data:c=[],color:m,valueFormatter:u=s.Cj,showAnimation:x=!1,className:h}=e,g=(0,a._T)(e,["data","color","valueFormatter","showAnimation","className"]),b=(r=c.map(e=>e.value),i=-1/0,r.forEach(e=>{i=Math.max(i,e)}),r.map(e=>0===e?0:Math.max(e/i*100,1)));return n.createElement("div",Object.assign({ref:t,className:(0,o.q)(d("root"),"flex justify-between space-x-6",h)},g),n.createElement("div",{className:(0,o.q)(d("bars"),"relative w-full")},c.map((e,t)=>{var r,a,i;let u=e.icon;return n.createElement("div",{key:null!==(r=e.key)&&void 0!==r?r:e.name,className:(0,o.q)(d("bar"),"flex items-center rounded-tremor-small bg-opacity-30","h-9",e.color||m?(0,s.bM)(null!==(a=e.color)&&void 0!==a?a:m,l.K.background).bgColor:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle dark:bg-opacity-30",t===c.length-1?"mb-0":"mb-2"),style:{width:"".concat(b[t],"%"),transition:x?"all 1s":""}},n.createElement("div",{className:(0,o.q)("absolute max-w-full flex left-2")},u?n.createElement(u,{className:(0,o.q)(d("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?n.createElement("a",{href:e.href,target:null!==(i=e.target)&&void 0!==i?i:"_blank",rel:"noreferrer",className:(0,o.q)(d("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name):n.createElement("p",{className:(0,o.q)(d("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name)))})),n.createElement("div",{className:"text-right min-w-min"},c.map((e,t)=>{var r;return n.createElement("div",{key:null!==(r=e.key)&&void 0!==r?r:e.name,className:(0,o.q)(d("labelWrapper"),"flex justify-end items-center","h-9",t===c.length-1?"mb-0":"mb-2")},n.createElement("p",{className:(0,o.q)(d("labelText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},u(e.value)))})))});i.displayName="BarList"},16312:function(e,t,r){"use strict";r.d(t,{z:function(){return a.Z}});var a=r(20831)},19130:function(e,t,r){"use strict";r.d(t,{RM:function(){return n.Z},SC:function(){return d.Z},iA:function(){return a.Z},pj:function(){return l.Z},ss:function(){return o.Z},xs:function(){return s.Z}});var a=r(21626),n=r(97214),l=r(28241),o=r(58834),s=r(69552),d=r(71876)},42954:function(e,t,r){"use strict";r.r(t);var a=r(57437),n=r(18143),l=r(39760),o=r(2265);t.default=()=>{let{accessToken:e,token:t,userRole:r,userId:s,premiumUser:d}=(0,l.Z)(),[i,c]=(0,o.useState)([]);return(0,a.jsx)(n.Z,{accessToken:e,token:t,userRole:r,userID:s,keys:i,premiumUser:d})}},39789:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var a=r(57437),n=r(2265),l=r(21487),o=r(84264),s=e=>{let{value:t,onValueChange:r,label:s="Select Time Range",className:d="",showTimeRange:i=!0}=e,[c,m]=(0,n.useState)(!1),u=(0,n.useRef)(null),x=(0,n.useCallback)(e=>{m(!0),setTimeout(()=>m(!1),1500),r(e),requestIdleCallback(()=>{if(e.from){let t;let a={...e},n=new Date(e.from);t=new Date(e.to?e.to:e.from),n.toDateString(),t.toDateString(),n.setHours(0,0,0,0),t.setHours(23,59,59,999),a.from=n,a.to=t,r(a)}},{timeout:100})},[r]),h=(0,n.useCallback)((e,t)=>{if(!e||!t)return"";let r=e=>e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});if(e.toDateString()!==t.toDateString())return"".concat(r(e)," - ").concat(r(t));{let r=e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),a=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),n=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});return"".concat(r,": ").concat(a," - ").concat(n)}},[]);return(0,a.jsxs)("div",{className:d,children:[s&&(0,a.jsx)(o.Z,{className:"mb-2",children:s}),(0,a.jsxs)("div",{className:"relative w-fit",children:[(0,a.jsx)("div",{ref:u,children:(0,a.jsx)(l.Z,{enableSelect:!0,value:t,onValueChange:x,placeholder:"Select date range",enableClear:!1,style:{zIndex:100}})}),c&&(0,a.jsx)("div",{className:"absolute top-1/2 animate-pulse",style:{left:"calc(100% + 8px)",transform:"translateY(-50%)",zIndex:110},children:(0,a.jsxs)("div",{className:"flex items-center gap-1 text-green-600 text-sm font-medium bg-white px-2 py-1 rounded-full border border-green-200 shadow-sm whitespace-nowrap",children:[(0,a.jsx)("div",{className:"w-3 h-3 bg-green-500 text-white rounded-full flex items-center justify-center text-xs",children:"✓"}),(0,a.jsx)("span",{className:"text-xs",children:"Selected"})]})})]}),i&&t.from&&t.to&&(0,a.jsx)(o.Z,{className:"mt-2 text-xs text-gray-500",children:h(t.from,t.to)})]})}},83438:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var a=r(57437),n=r(2265),l=r(40278),o=r(94292),s=r(19250);let d=e=>{let{key:t,info:r}=e;return{token:t,...r}};var i=r(12322),c=r(89970),m=r(16312),u=r(59872),x=r(44633),h=r(86462),g=e=>{let{topKeys:t,accessToken:r,userID:g,userRole:b,teams:p,premiumUser:f,showTags:k=!1}=e,[v,w]=(0,n.useState)(!1),[y,N]=(0,n.useState)(null),[j,C]=(0,n.useState)(void 0),[E,S]=(0,n.useState)("table"),[_,Z]=(0,n.useState)(new Set),q=e=>{Z(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},M=async e=>{if(r)try{let t=await (0,s.keyInfoV1Call)(r,e.api_key),a=d(t);C(a),N(e.api_key),w(!0)}catch(e){console.error("Error fetching key info:",e)}},R=()=>{w(!1),N(null),C(void 0)};n.useEffect(()=>{let e=e=>{"Escape"===e.key&&v&&R()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[v]);let T=[{header:"Key ID",accessorKey:"api_key",cell:e=>(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(c.Z,{title:e.getValue(),children:(0,a.jsx)(m.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:()=>M(e.row.original),children:e.getValue()?"".concat(e.getValue().slice(0,7),"..."):"-"})})})},{header:"Key Alias",accessorKey:"key_alias",cell:e=>e.getValue()||"-"}],D={header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return t>0&&t<.01?"<$0.01":"$".concat((0,u.pw)(t,2))}},L=k?[...T,{header:"Tags",accessorKey:"tags",cell:e=>{let t=e.getValue(),r=e.row.original.api_key,n=_.has(r);if(!t||0===t.length)return"-";let l=t.sort((e,t)=>t.usage-e.usage),o=n?l:l.slice(0,2),s=t.length>2;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[o.map((e,t)=>(0,a.jsx)(c.Z,{title:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Tag Name:"})," ",e.tag]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Spend:"})," ",e.usage>0&&e.usage<.01?"<$0.01":"$".concat((0,u.pw)(e.usage,2))]})]}),children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[e.tag.slice(0,7),"..."]})},t)),s&&(0,a.jsx)("button",{onClick:()=>q(r),className:"ml-1 p-1 hover:bg-gray-200 rounded-full transition-colors",title:n?"Show fewer tags":"Show all tags",children:n?(0,a.jsx)(x.Z,{className:"h-3 w-3 text-gray-500"}):(0,a.jsx)(h.Z,{className:"h-3 w-3 text-gray-500"})})]})})}},D]:[...T,D],I=t.map(e=>({...e,display_key_alias:e.key_alias&&e.key_alias.length>10?"".concat(e.key_alias.slice(0,10),"..."):e.key_alias||"-"}));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 flex justify-end items-center",children:(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:()=>S("table"),className:"px-3 py-1 text-sm rounded-md ".concat("table"===E?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Table View"}),(0,a.jsx)("button",{onClick:()=>S("chart"),className:"px-3 py-1 text-sm rounded-md ".concat("chart"===E?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Chart View"})]})}),"chart"===E?(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(l.Z,{className:"mt-4 h-40 cursor-pointer hover:opacity-90",data:I,index:"display_key_alias",categories:["spend"],colors:["cyan"],yAxisWidth:120,tickGap:5,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>e?"$".concat((0,u.pw)(e,2)):"No Key Alias",onValueChange:e=>M(e),showTooltip:!0,customTooltip:e=>{var t,r;let n=null===(r=e.payload)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.payload;return(0,a.jsx)("div",{className:"relative z-50 p-3 bg-black/90 shadow-lg rounded-lg text-white max-w-xs",children:(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Key Alias: "}),(0,a.jsx)("span",{className:"font-mono text-gray-100 break-all",children:null==n?void 0:n.key_alias})]}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Key ID: "}),(0,a.jsx)("span",{className:"font-mono text-gray-100 break-all",children:null==n?void 0:n.api_key})]}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Spend: "}),(0,a.jsxs)("span",{className:"text-white font-medium",children:["$",(0,u.pw)(null==n?void 0:n.spend,2)]})]})]})})}})}):(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,a.jsx)(i.w,{columns:L,data:t,renderSubComponent:()=>(0,a.jsx)(a.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})}),v&&y&&j&&(console.log("Rendering modal with:",{isModalOpen:v,selectedKey:y,keyData:j}),(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",onClick:e=>{e.target===e.currentTarget&&R()},children:(0,a.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,a.jsx)("button",{onClick:R,className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700 focus:outline-none","aria-label":"Close",children:(0,a.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),(0,a.jsx)("div",{className:"p-6 h-full",children:(0,a.jsx)(o.Z,{keyId:y,onClose:R,keyData:j,accessToken:r,userID:g,userRole:b,teams:p,premiumUser:f})})]})}))]})}},12322:function(e,t,r){"use strict";r.d(t,{w:function(){return d}});var a=r(57437),n=r(2265),l=r(71594),o=r(24525),s=r(19130);function d(e){let{data:t=[],columns:r,getRowCanExpand:d,renderSubComponent:i,isLoading:c=!1,loadingMessage:m="\uD83D\uDE85 Loading logs...",noDataMessage:u="No logs found"}=e,x=(0,l.b7)({data:t,columns:r,getRowCanExpand:d,getRowId:(e,t)=>{var r;return null!==(r=null==e?void 0:e.request_id)&&void 0!==r?r:String(t)},getCoreRowModel:(0,o.sC)(),getExpandedRowModel:(0,o.rV)()});return(0,a.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,a.jsxs)(s.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,a.jsx)(s.ss,{children:x.getHeaderGroups().map(e=>(0,a.jsx)(s.SC,{children:e.headers.map(e=>(0,a.jsx)(s.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,l.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,a.jsx)(s.RM,{children:c?(0,a.jsx)(s.SC,{children:(0,a.jsx)(s.pj,{colSpan:r.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:m})})})}):x.getRowModel().rows.length>0?x.getRowModel().rows.map(e=>(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)(s.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,a.jsx)(s.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,l.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,a.jsx)(s.SC,{children:(0,a.jsx)(s.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,a.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:i({row:e})})})})]},e.id)):(0,a.jsx)(s.SC,{children:(0,a.jsx)(s.pj,{colSpan:r.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:u})})})})})]})})}},47375:function(e,t,r){"use strict";var a=r(57437),n=r(2265),l=r(19250),o=r(59872);t.Z=e=>{let{userID:t,userRole:r,accessToken:s,userSpend:d,userMaxBudget:i,selectedTeam:c}=e;console.log("userSpend: ".concat(d));let[m,u]=(0,n.useState)(null!==d?d:0),[x,h]=(0,n.useState)(c?Number((0,o.pw)(c.max_budget,4)):null);(0,n.useEffect)(()=>{if(c){if("Default Team"===c.team_alias)h(i);else{let e=!1;if(c.team_memberships)for(let r of c.team_memberships)r.user_id===t&&"max_budget"in r.litellm_budget_table&&null!==r.litellm_budget_table.max_budget&&(h(r.litellm_budget_table.max_budget),e=!0);e||h(c.max_budget)}}},[c,i]);let[g,b]=(0,n.useState)([]);(0,n.useEffect)(()=>{let e=async()=>{if(!s||!t||!r)return};(async()=>{try{if(null===t||null===r)return;if(null!==s){let e=(await (0,l.modelAvailableCall)(s,t,r)).data.map(e=>e.id);console.log("available_model_names:",e),b(e)}}catch(e){console.error("Error fetching user models:",e)}})(),e()},[r,s,t]),(0,n.useEffect)(()=>{null!==d&&u(d)},[d]);let p=[];c&&c.models&&(p=c.models),p&&p.includes("all-proxy-models")?(console.log("user models:",g),p=g):p&&p.includes("all-team-models")?p=c.models:p&&0===p.length&&(p=g);let f=null!==x?"$".concat((0,o.pw)(Number(x),4)," limit"):"No limit",k=void 0!==m?(0,o.pw)(m,4):null;return console.log("spend in view user spend: ".concat(m)),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("div",{className:"flex justify-between gap-x-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Total Spend"}),(0,a.jsxs)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:["$",k]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Max Budget"}),(0,a.jsx)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:f})]})]})})}},10900:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.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),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=n}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,5188,2344,1487,7732,1160,8049,131,2202,874,4292,8143,2971,2117,1744],function(){return e(e.s=59898)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[813],{59898:function(e,t,r){Promise.resolve().then(r.bind(r,42954))},47323:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var a=r(5853),n=r(2265),l=r(1526),o=r(7084),s=r(97324),d=r(1153),i=r(26898);let c={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"}},m={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"}},u={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:""}},x=(e,t)=>{switch(e){case"simple":return{textColor:t?(0,d.bM)(t,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,d.bM)(t,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,d.bM)(t,i.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,d.bM)(t,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,d.bM)(t,i.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,d.bM)(t,i.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,s.q)((0,d.bM)(t,i.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,d.bM)(t,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,s.q)((0,d.bM)(t,i.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,d.bM)(t,i.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,s.q)((0,d.bM)(t,i.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},h=(0,d.fn)("Icon"),g=n.forwardRef((e,t)=>{let{icon:r,variant:i="simple",tooltip:g,size:b=o.u8.SM,color:p,className:f}=e,k=(0,a._T)(e,["icon","variant","tooltip","size","color","className"]),v=x(i,p),{tooltipProps:w,getReferenceProps:y}=(0,l.l)();return n.createElement("span",Object.assign({ref:(0,d.lq)([t,w.refs.setReference]),className:(0,s.q)(h("root"),"inline-flex flex-shrink-0 items-center",v.bgColor,v.textColor,v.borderColor,v.ringColor,u[i].rounded,u[i].border,u[i].shadow,u[i].ring,c[b].paddingX,c[b].paddingY,f)},y,k),n.createElement(l.Z,Object.assign({text:g},w)),n.createElement(r,{className:(0,s.q)(h("icon"),"shrink-0",m[b].height,m[b].width)}))});g.displayName="Icon"},92414:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var a=r(5853),n=r(2265);r(42698),r(64016),r(8710);var l=r(33232),o=r(44140),s=r(58747);let d=e=>{var t=(0,a._T)(e,[]);return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),n.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 i=r(4537),c=r(9528),m=r(33044);let u=e=>{var t=(0,a._T)(e,[]);return n.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),n.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),n.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))};var x=r(97324),h=r(1153),g=r(96398);let b=(0,h.fn)("MultiSelect"),p=n.forwardRef((e,t)=>{let{defaultValue:r,value:h,onValueChange:p,placeholder:f="Select...",placeholderSearch:k="Search",disabled:v=!1,icon:w,children:y,className:N}=e,j=(0,a._T)(e,["defaultValue","value","onValueChange","placeholder","placeholderSearch","disabled","icon","children","className"]),[C,E]=(0,o.Z)(r,h),{reactElementChildren:S,optionsAvailable:_}=(0,n.useMemo)(()=>{let e=n.Children.toArray(y).filter(n.isValidElement);return{reactElementChildren:e,optionsAvailable:(0,g.n0)("",e)}},[y]),[Z,q]=(0,n.useState)(""),M=(null!=C?C:[]).length>0,R=(0,n.useMemo)(()=>Z?(0,g.n0)(Z,S):_,[Z,S,_]),T=()=>{q("")};return n.createElement(c.R,Object.assign({as:"div",ref:t,defaultValue:C,value:C,onChange:e=>{null==p||p(e),E(e)},disabled:v,className:(0,x.q)("w-full min-w-[10rem] relative text-tremor-default",N)},j,{multiple:!0}),e=>{let{value:t}=e;return n.createElement(n.Fragment,null,n.createElement(c.R.Button,{className:(0,x.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,g.um)(t.length>0,v))},w&&n.createElement("span",{className:(0,x.q)("absolute inset-y-0 left-0 flex items-center ml-px pl-2.5")},n.createElement(w,{className:(0,x.q)(b("Icon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),n.createElement("div",{className:"h-6 flex items-center"},t.length>0?n.createElement("div",{className:"flex flex-nowrap overflow-x-scroll [&::-webkit-scrollbar]:hidden [scrollbar-width:none] gap-x-1 mr-5 -ml-1.5 relative"},_.filter(e=>t.includes(e.props.value)).map((e,r)=>{var a;return n.createElement("div",{key:r,className:(0,x.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")},n.createElement("div",{className:"text-xs truncate "},null!==(a=e.props.children)&&void 0!==a?a:e.props.value),n.createElement("div",{onClick:r=>{r.preventDefault();let a=t.filter(t=>t!==e.props.value);null==p||p(a),E(a)}},n.createElement(u,{className:(0,x.q)(b("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")})))})):n.createElement("span",null,f)),n.createElement("span",{className:(0,x.q)("absolute inset-y-0 right-0 flex items-center mr-2.5")},n.createElement(s.Z,{className:(0,x.q)(b("arrowDownIcon"),"flex-none h-5 w-5","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")}))),M&&!v?n.createElement("button",{type:"button",className:(0,x.q)("absolute inset-y-0 right-0 flex items-center mr-8"),onClick:e=>{e.preventDefault(),E([]),null==p||p([])}},n.createElement(i.Z,{className:(0,x.q)(b("clearIconAllItems"),"flex-none h-4 w-4","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})):null,n.createElement(m.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"},n.createElement(c.R.Options,{className:(0,x.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")},n.createElement("div",{className:(0,x.q)("flex items-center w-full px-2.5","bg-tremor-background-muted","dark:bg-dark-tremor-background-muted")},n.createElement("span",null,n.createElement(d,{className:(0,x.q)("flex-none w-4 h-4 mr-2","text-tremor-content-subtle","dark:text-dark-tremor-content-subtle")})),n.createElement("input",{name:"search",type:"input",autoComplete:"off",placeholder:k,className:(0,x.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=>q(e.target.value),value:Z})),n.createElement(l.Z.Provider,Object.assign({},{onBlur:{handleResetSearch:T}},{value:{selectedValue:t}}),R))))})});p.displayName="MultiSelect"},46030:function(e,t,r){"use strict";r.d(t,{Z:function(){return c}});var a=r(5853);r(42698),r(64016),r(8710);var n=r(33232),l=r(2265),o=r(97324),s=r(1153),d=r(9528);let i=(0,s.fn)("MultiSelectItem"),c=l.forwardRef((e,t)=>{let{value:r,className:c,children:m}=e,u=(0,a._T)(e,["value","className","children"]),{selectedValue:x}=(0,l.useContext)(n.Z),h=(0,s.NZ)(r,x);return l.createElement(d.R.Option,Object.assign({className:(0,o.q)(i("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",c),ref:t,key:r,value:r},u),l.createElement("input",{type:"checkbox",className:(0,o.q)(i("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}),l.createElement("span",{className:"whitespace-nowrap truncate"},null!=m?m:r))});c.displayName="MultiSelectItem"},96889:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var a=r(5853),n=r(2265),l=r(26898),o=r(97324),s=r(1153);let d=(0,s.fn)("BarList"),i=n.forwardRef((e,t)=>{var r;let i;let{data:c=[],color:m,valueFormatter:u=s.Cj,showAnimation:x=!1,className:h}=e,g=(0,a._T)(e,["data","color","valueFormatter","showAnimation","className"]),b=(r=c.map(e=>e.value),i=-1/0,r.forEach(e=>{i=Math.max(i,e)}),r.map(e=>0===e?0:Math.max(e/i*100,1)));return n.createElement("div",Object.assign({ref:t,className:(0,o.q)(d("root"),"flex justify-between space-x-6",h)},g),n.createElement("div",{className:(0,o.q)(d("bars"),"relative w-full")},c.map((e,t)=>{var r,a,i;let u=e.icon;return n.createElement("div",{key:null!==(r=e.key)&&void 0!==r?r:e.name,className:(0,o.q)(d("bar"),"flex items-center rounded-tremor-small bg-opacity-30","h-9",e.color||m?(0,s.bM)(null!==(a=e.color)&&void 0!==a?a:m,l.K.background).bgColor:"bg-tremor-brand-subtle dark:bg-dark-tremor-brand-subtle dark:bg-opacity-30",t===c.length-1?"mb-0":"mb-2"),style:{width:"".concat(b[t],"%"),transition:x?"all 1s":""}},n.createElement("div",{className:(0,o.q)("absolute max-w-full flex left-2")},u?n.createElement(u,{className:(0,o.q)(d("barIcon"),"flex-none h-5 w-5 mr-2","text-tremor-content","dark:text-dark-tremor-content")}):null,e.href?n.createElement("a",{href:e.href,target:null!==(i=e.target)&&void 0!==i?i:"_blank",rel:"noreferrer",className:(0,o.q)(d("barLink"),"whitespace-nowrap hover:underline truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name):n.createElement("p",{className:(0,o.q)(d("barText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},e.name)))})),n.createElement("div",{className:"text-right min-w-min"},c.map((e,t)=>{var r;return n.createElement("div",{key:null!==(r=e.key)&&void 0!==r?r:e.name,className:(0,o.q)(d("labelWrapper"),"flex justify-end items-center","h-9",t===c.length-1?"mb-0":"mb-2")},n.createElement("p",{className:(0,o.q)(d("labelText"),"whitespace-nowrap truncate text-tremor-default","text-tremor-content-emphasis","dark:text-dark-tremor-content-emphasis")},u(e.value)))})))});i.displayName="BarList"},16312:function(e,t,r){"use strict";r.d(t,{z:function(){return a.Z}});var a=r(20831)},19130:function(e,t,r){"use strict";r.d(t,{RM:function(){return n.Z},SC:function(){return d.Z},iA:function(){return a.Z},pj:function(){return l.Z},ss:function(){return o.Z},xs:function(){return s.Z}});var a=r(21626),n=r(97214),l=r(28241),o=r(58834),s=r(69552),d=r(71876)},42954:function(e,t,r){"use strict";r.r(t);var a=r(57437),n=r(18143),l=r(80443),o=r(2265);t.default=()=>{let{accessToken:e,token:t,userRole:r,userId:s,premiumUser:d}=(0,l.Z)(),[i,c]=(0,o.useState)([]);return(0,a.jsx)(n.Z,{accessToken:e,token:t,userRole:r,userID:s,keys:i,premiumUser:d})}},39789:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var a=r(57437),n=r(2265),l=r(21487),o=r(84264),s=e=>{let{value:t,onValueChange:r,label:s="Select Time Range",className:d="",showTimeRange:i=!0}=e,[c,m]=(0,n.useState)(!1),u=(0,n.useRef)(null),x=(0,n.useCallback)(e=>{m(!0),setTimeout(()=>m(!1),1500),r(e),requestIdleCallback(()=>{if(e.from){let t;let a={...e},n=new Date(e.from);t=new Date(e.to?e.to:e.from),n.toDateString(),t.toDateString(),n.setHours(0,0,0,0),t.setHours(23,59,59,999),a.from=n,a.to=t,r(a)}},{timeout:100})},[r]),h=(0,n.useCallback)((e,t)=>{if(!e||!t)return"";let r=e=>e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});if(e.toDateString()!==t.toDateString())return"".concat(r(e)," - ").concat(r(t));{let r=e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),a=e.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}),n=t.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"});return"".concat(r,": ").concat(a," - ").concat(n)}},[]);return(0,a.jsxs)("div",{className:d,children:[s&&(0,a.jsx)(o.Z,{className:"mb-2",children:s}),(0,a.jsxs)("div",{className:"relative w-fit",children:[(0,a.jsx)("div",{ref:u,children:(0,a.jsx)(l.Z,{enableSelect:!0,value:t,onValueChange:x,placeholder:"Select date range",enableClear:!1,style:{zIndex:100}})}),c&&(0,a.jsx)("div",{className:"absolute top-1/2 animate-pulse",style:{left:"calc(100% + 8px)",transform:"translateY(-50%)",zIndex:110},children:(0,a.jsxs)("div",{className:"flex items-center gap-1 text-green-600 text-sm font-medium bg-white px-2 py-1 rounded-full border border-green-200 shadow-sm whitespace-nowrap",children:[(0,a.jsx)("div",{className:"w-3 h-3 bg-green-500 text-white rounded-full flex items-center justify-center text-xs",children:"✓"}),(0,a.jsx)("span",{className:"text-xs",children:"Selected"})]})})]}),i&&t.from&&t.to&&(0,a.jsx)(o.Z,{className:"mt-2 text-xs text-gray-500",children:h(t.from,t.to)})]})}},83438:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var a=r(57437),n=r(2265),l=r(40278),o=r(94292),s=r(19250);let d=e=>{let{key:t,info:r}=e;return{token:t,...r}};var i=r(12322),c=r(89970),m=r(16312),u=r(59872),x=r(44633),h=r(86462),g=e=>{let{topKeys:t,accessToken:r,userID:g,userRole:b,teams:p,premiumUser:f,showTags:k=!1}=e,[v,w]=(0,n.useState)(!1),[y,N]=(0,n.useState)(null),[j,C]=(0,n.useState)(void 0),[E,S]=(0,n.useState)("table"),[_,Z]=(0,n.useState)(new Set),q=e=>{Z(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},M=async e=>{if(r)try{let t=await (0,s.keyInfoV1Call)(r,e.api_key),a=d(t);C(a),N(e.api_key),w(!0)}catch(e){console.error("Error fetching key info:",e)}},R=()=>{w(!1),N(null),C(void 0)};n.useEffect(()=>{let e=e=>{"Escape"===e.key&&v&&R()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[v]);let T=[{header:"Key ID",accessorKey:"api_key",cell:e=>(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(c.Z,{title:e.getValue(),children:(0,a.jsx)(m.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:()=>M(e.row.original),children:e.getValue()?"".concat(e.getValue().slice(0,7),"..."):"-"})})})},{header:"Key Alias",accessorKey:"key_alias",cell:e=>e.getValue()||"-"}],D={header:"Spend (USD)",accessorKey:"spend",cell:e=>{let t=e.getValue();return t>0&&t<.01?"<$0.01":"$".concat((0,u.pw)(t,2))}},L=k?[...T,{header:"Tags",accessorKey:"tags",cell:e=>{let t=e.getValue(),r=e.row.original.api_key,n=_.has(r);if(!t||0===t.length)return"-";let l=t.sort((e,t)=>t.usage-e.usage),o=n?l:l.slice(0,2),s=t.length>2;return(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[o.map((e,t)=>(0,a.jsx)(c.Z,{title:(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Tag Name:"})," ",e.tag]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Spend:"})," ",e.usage>0&&e.usage<.01?"<$0.01":"$".concat((0,u.pw)(e.usage,2))]})]}),children:(0,a.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[e.tag.slice(0,7),"..."]})},t)),s&&(0,a.jsx)("button",{onClick:()=>q(r),className:"ml-1 p-1 hover:bg-gray-200 rounded-full transition-colors",title:n?"Show fewer tags":"Show all tags",children:n?(0,a.jsx)(x.Z,{className:"h-3 w-3 text-gray-500"}):(0,a.jsx)(h.Z,{className:"h-3 w-3 text-gray-500"})})]})})}},D]:[...T,D],I=t.map(e=>({...e,display_key_alias:e.key_alias&&e.key_alias.length>10?"".concat(e.key_alias.slice(0,10),"..."):e.key_alias||"-"}));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"mb-4 flex justify-end items-center",children:(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:()=>S("table"),className:"px-3 py-1 text-sm rounded-md ".concat("table"===E?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Table View"}),(0,a.jsx)("button",{onClick:()=>S("chart"),className:"px-3 py-1 text-sm rounded-md ".concat("chart"===E?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"),children:"Chart View"})]})}),"chart"===E?(0,a.jsx)("div",{className:"relative",children:(0,a.jsx)(l.Z,{className:"mt-4 h-40 cursor-pointer hover:opacity-90",data:I,index:"display_key_alias",categories:["spend"],colors:["cyan"],yAxisWidth:120,tickGap:5,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>e?"$".concat((0,u.pw)(e,2)):"No Key Alias",onValueChange:e=>M(e),showTooltip:!0,customTooltip:e=>{var t,r;let n=null===(r=e.payload)||void 0===r?void 0:null===(t=r[0])||void 0===t?void 0:t.payload;return(0,a.jsx)("div",{className:"relative z-50 p-3 bg-black/90 shadow-lg rounded-lg text-white max-w-xs",children:(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Key Alias: "}),(0,a.jsx)("span",{className:"font-mono text-gray-100 break-all",children:null==n?void 0:n.key_alias})]}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Key ID: "}),(0,a.jsx)("span",{className:"font-mono text-gray-100 break-all",children:null==n?void 0:n.api_key})]}),(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsx)("span",{className:"text-gray-300",children:"Spend: "}),(0,a.jsxs)("span",{className:"text-white font-medium",children:["$",(0,u.pw)(null==n?void 0:n.spend,2)]})]})]})})}})}):(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,a.jsx)(i.w,{columns:L,data:t,renderSubComponent:()=>(0,a.jsx)(a.Fragment,{}),getRowCanExpand:()=>!1,isLoading:!1})}),v&&y&&j&&(console.log("Rendering modal with:",{isModalOpen:v,selectedKey:y,keyData:j}),(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",onClick:e=>{e.target===e.currentTarget&&R()},children:(0,a.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,a.jsx)("button",{onClick:R,className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700 focus:outline-none","aria-label":"Close",children:(0,a.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),(0,a.jsx)("div",{className:"p-6 h-full",children:(0,a.jsx)(o.Z,{keyId:y,onClose:R,keyData:j,accessToken:r,userID:g,userRole:b,teams:p,premiumUser:f})})]})}))]})}},12322:function(e,t,r){"use strict";r.d(t,{w:function(){return d}});var a=r(57437),n=r(2265),l=r(71594),o=r(24525),s=r(19130);function d(e){let{data:t=[],columns:r,getRowCanExpand:d,renderSubComponent:i,isLoading:c=!1,loadingMessage:m="\uD83D\uDE85 Loading logs...",noDataMessage:u="No logs found"}=e,x=(0,l.b7)({data:t,columns:r,getRowCanExpand:d,getRowId:(e,t)=>{var r;return null!==(r=null==e?void 0:e.request_id)&&void 0!==r?r:String(t)},getCoreRowModel:(0,o.sC)(),getExpandedRowModel:(0,o.rV)()});return(0,a.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,a.jsxs)(s.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,a.jsx)(s.ss,{children:x.getHeaderGroups().map(e=>(0,a.jsx)(s.SC,{children:e.headers.map(e=>(0,a.jsx)(s.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,l.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,a.jsx)(s.RM,{children:c?(0,a.jsx)(s.SC,{children:(0,a.jsx)(s.pj,{colSpan:r.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:m})})})}):x.getRowModel().rows.length>0?x.getRowModel().rows.map(e=>(0,a.jsxs)(n.Fragment,{children:[(0,a.jsx)(s.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,a.jsx)(s.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,l.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,a.jsx)(s.SC,{children:(0,a.jsx)(s.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,a.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:i({row:e})})})})]},e.id)):(0,a.jsx)(s.SC,{children:(0,a.jsx)(s.pj,{colSpan:r.length,className:"h-8 text-center",children:(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("p",{children:u})})})})})]})})}},47375:function(e,t,r){"use strict";var a=r(57437),n=r(2265),l=r(19250),o=r(59872);t.Z=e=>{let{userID:t,userRole:r,accessToken:s,userSpend:d,userMaxBudget:i,selectedTeam:c}=e;console.log("userSpend: ".concat(d));let[m,u]=(0,n.useState)(null!==d?d:0),[x,h]=(0,n.useState)(c?Number((0,o.pw)(c.max_budget,4)):null);(0,n.useEffect)(()=>{if(c){if("Default Team"===c.team_alias)h(i);else{let e=!1;if(c.team_memberships)for(let r of c.team_memberships)r.user_id===t&&"max_budget"in r.litellm_budget_table&&null!==r.litellm_budget_table.max_budget&&(h(r.litellm_budget_table.max_budget),e=!0);e||h(c.max_budget)}}},[c,i]);let[g,b]=(0,n.useState)([]);(0,n.useEffect)(()=>{let e=async()=>{if(!s||!t||!r)return};(async()=>{try{if(null===t||null===r)return;if(null!==s){let e=(await (0,l.modelAvailableCall)(s,t,r)).data.map(e=>e.id);console.log("available_model_names:",e),b(e)}}catch(e){console.error("Error fetching user models:",e)}})(),e()},[r,s,t]),(0,n.useEffect)(()=>{null!==d&&u(d)},[d]);let p=[];c&&c.models&&(p=c.models),p&&p.includes("all-proxy-models")?(console.log("user models:",g),p=g):p&&p.includes("all-team-models")?p=c.models:p&&0===p.length&&(p=g);let f=null!==x?"$".concat((0,o.pw)(Number(x),4)," limit"):"No limit",k=void 0!==m?(0,o.pw)(m,4):null;return console.log("spend in view user spend: ".concat(m)),(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)("div",{className:"flex justify-between gap-x-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Total Spend"}),(0,a.jsxs)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:["$",k]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Max Budget"}),(0,a.jsx)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:f})]})]})})}},10900:function(e,t,r){"use strict";var a=r(2265);let n=a.forwardRef(function(e,t){return a.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),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});t.Z=n}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,5188,2344,1487,7732,1160,8049,131,2202,874,4292,8143,2971,2117,1744],function(){return e(e.s=59898)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/prompts/page-38da9eade6ce2128.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/prompts/page-aa6e8e445ebb8a78.js similarity index 95% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/prompts/page-38da9eade6ce2128.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/prompts/page-aa6e8e445ebb8a78.js index a3a8db3b9cd..adae5455464 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/prompts/page-38da9eade6ce2128.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/prompts/page-aa6e8e445ebb8a78.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2099],{71620:function(e,n,r){Promise.resolve().then(r.bind(r,51599))},84717:function(e,n,r){"use strict";r.d(n,{Ct:function(){return t.Z},Dx:function(){return m.Z},OK:function(){return l.Z},Zb:function(){return i.Z},nP:function(){return d.Z},rj:function(){return o.Z},td:function(){return a.Z},v0:function(){return c.Z},x4:function(){return s.Z},xv:function(){return f.Z},zx:function(){return u.Z}});var t=r(41649),u=r(20831),i=r(12514),o=r(67101),l=r(12485),c=r(18135),a=r(35242),s=r(29706),d=r(77991),f=r(84264),m=r(96761)},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return t.Z}});var t=r(20831)},51599:function(e,n,r){"use strict";r.r(n);var t=r(57437),u=r(30603),i=r(39760);n.default=()=>{let{accessToken:e}=(0,i.Z)();return(0,t.jsx)(u.Z,{accessToken:e})}},39760:function(e,n,r){"use strict";var t=r(2265),u=r(99376),i=r(14474),o=r(3914);n.Z=()=>{var e,n,r,l,c,a,s;let d=(0,u.useRouter)(),f="undefined"!=typeof document?(0,o.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let m=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,i.o)(f)}catch(e){return(0,o.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==m?void 0:m.key)&&void 0!==e?e:null,userId:null!==(n=null==m?void 0:m.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==m?void 0:m.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==m?void 0:m.user_role)&&void 0!==l?l:null),premiumUser:null!==(c=null==m?void 0:m.premium_user)&&void 0!==c?c:null,disabledPersonalKeyCreation:null!==(a=null==m?void 0:m.disabled_non_admin_personal_key_creation)&&void 0!==a?a:null,showSSOBanner:(null==m?void 0:m.login_method)==="username_password"}}},59872:function(e,n,r){"use strict";r.d(n,{nl:function(){return u},pw:function(){return i},vQ:function(){return o}});var t=r(9114);function u(e,n){let r=structuredClone(e);for(let[e,t]of Object.entries(n))e in r&&(r[e]=t);return r}let i=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||!Number.isFinite(e))return"-";let t={minimumFractionDigits:n,maximumFractionDigits:n};if(!r)return e.toLocaleString("en-US",t);let u=Math.abs(e),i=u,o="";return u>=1e6?(i=u/1e6,o="M"):u>=1e3&&(i=u/1e3,o="K"),"".concat(e<0?"-":"").concat(i.toLocaleString("en-US",t)).concat(o)},o=async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return l(e,n);try{return await navigator.clipboard.writeText(e),t.Z.success(n),!0}catch(r){return console.error("Clipboard API failed: ",r),l(e,n)}},l=(e,n)=>{try{let r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",r.setAttribute("readonly",""),document.body.appendChild(r),r.focus(),r.select();let u=document.execCommand("copy");if(document.body.removeChild(r),u)return t.Z.success(n),!0;throw Error("execCommand failed")}catch(e){return t.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}}},20347:function(e,n,r){"use strict";r.d(n,{LQ:function(){return i},ZL:function(){return t},lo:function(){return u},tY:function(){return o}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],u=["Internal User","Internal Viewer"],i=["Internal User","Admin","proxy_admin"],o=e=>t.includes(e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,2525,9011,5319,8347,8049,603,2971,2117,1744],function(){return e(e.s=71620)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2099],{71620:function(e,n,r){Promise.resolve().then(r.bind(r,51599))},84717:function(e,n,r){"use strict";r.d(n,{Ct:function(){return t.Z},Dx:function(){return m.Z},OK:function(){return l.Z},Zb:function(){return i.Z},nP:function(){return d.Z},rj:function(){return o.Z},td:function(){return a.Z},v0:function(){return c.Z},x4:function(){return s.Z},xv:function(){return f.Z},zx:function(){return u.Z}});var t=r(41649),u=r(20831),i=r(12514),o=r(67101),l=r(12485),c=r(18135),a=r(35242),s=r(29706),d=r(77991),f=r(84264),m=r(96761)},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return t.Z}});var t=r(20831)},51599:function(e,n,r){"use strict";r.r(n);var t=r(57437),u=r(30603),i=r(80443);n.default=()=>{let{accessToken:e}=(0,i.Z)();return(0,t.jsx)(u.Z,{accessToken:e})}},80443:function(e,n,r){"use strict";var t=r(2265),u=r(99376),i=r(14474),o=r(3914);n.Z=()=>{var e,n,r,l,c,a,s;let d=(0,u.useRouter)(),f="undefined"!=typeof document?(0,o.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let m=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,i.o)(f)}catch(e){return(0,o.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==m?void 0:m.key)&&void 0!==e?e:null,userId:null!==(n=null==m?void 0:m.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==m?void 0:m.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==m?void 0:m.user_role)&&void 0!==l?l:null),premiumUser:null!==(c=null==m?void 0:m.premium_user)&&void 0!==c?c:null,disabledPersonalKeyCreation:null!==(a=null==m?void 0:m.disabled_non_admin_personal_key_creation)&&void 0!==a?a:null,showSSOBanner:(null==m?void 0:m.login_method)==="username_password"}}},59872:function(e,n,r){"use strict";r.d(n,{nl:function(){return u},pw:function(){return i},vQ:function(){return o}});var t=r(9114);function u(e,n){let r=structuredClone(e);for(let[e,t]of Object.entries(n))e in r&&(r[e]=t);return r}let i=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||!Number.isFinite(e))return"-";let t={minimumFractionDigits:n,maximumFractionDigits:n};if(!r)return e.toLocaleString("en-US",t);let u=Math.abs(e),i=u,o="";return u>=1e6?(i=u/1e6,o="M"):u>=1e3&&(i=u/1e3,o="K"),"".concat(e<0?"-":"").concat(i.toLocaleString("en-US",t)).concat(o)},o=async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return l(e,n);try{return await navigator.clipboard.writeText(e),t.Z.success(n),!0}catch(r){return console.error("Clipboard API failed: ",r),l(e,n)}},l=(e,n)=>{try{let r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",r.setAttribute("readonly",""),document.body.appendChild(r),r.focus(),r.select();let u=document.execCommand("copy");if(document.body.removeChild(r),u)return t.Z.success(n),!0;throw Error("execCommand failed")}catch(e){return t.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}}},20347:function(e,n,r){"use strict";r.d(n,{LQ:function(){return i},ZL:function(){return t},lo:function(){return u},tY:function(){return o}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],u=["Internal User","Internal Viewer"],i=["Internal User","Admin","proxy_admin"],o=e=>t.includes(e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,2525,9011,5319,8347,8049,603,2971,2117,1744],function(){return e(e.s=71620)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/tag-management/page-5c90fd436b46801a.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/tag-management/page-75c463f6d2f3343a.js similarity index 91% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/tag-management/page-5c90fd436b46801a.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/tag-management/page-75c463f6d2f3343a.js index 569c9d2a82a..2154450d038 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/tag-management/page-5c90fd436b46801a.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/experimental/tag-management/page-75c463f6d2f3343a.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6061],{86947:function(n,u,e){Promise.resolve().then(e.bind(e,21933))},45822:function(n,u,e){"use strict";e.d(u,{JO:function(){return s.Z},JX:function(){return t.Z},rj:function(){return c.Z},xv:function(){return i.Z},zx:function(){return r.Z}});var r=e(20831),t=e(49804),c=e(67101),s=e(47323),i=e(84264)},21933:function(n,u,e){"use strict";e.r(u);var r=e(57437),t=e(42273),c=e(39760);u.default=()=>{let{accessToken:n,userId:u,userRole:e}=(0,c.Z)();return(0,r.jsx)(t.Z,{accessToken:n,userID:u,userRole:e})}}},function(n){n.O(0,[1114,1491,4556,2417,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,5188,2451,8049,131,2202,874,2273,2971,2117,1744],function(){return n(n.s=86947)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6061],{86947:function(n,u,e){Promise.resolve().then(e.bind(e,21933))},45822:function(n,u,e){"use strict";e.d(u,{JO:function(){return s.Z},JX:function(){return t.Z},rj:function(){return c.Z},xv:function(){return i.Z},zx:function(){return r.Z}});var r=e(20831),t=e(49804),c=e(67101),s=e(47323),i=e(84264)},21933:function(n,u,e){"use strict";e.r(u);var r=e(57437),t=e(42273),c=e(80443);u.default=()=>{let{accessToken:n,userId:u,userRole:e}=(0,c.Z)();return(0,r.jsx)(t.Z,{accessToken:n,userID:u,userRole:e})}}},function(n){n.O(0,[1114,1491,4556,2417,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,5188,2451,8049,131,2202,874,2273,2971,2117,1744],function(){return n(n.s=86947)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/guardrails/page-d2df3bc5d3bfaa75.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/guardrails/page-63092ae43b1144df.js similarity index 97% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/guardrails/page-d2df3bc5d3bfaa75.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/guardrails/page-63092ae43b1144df.js index 9b8f7a69ac2..d24a83a69be 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/guardrails/page-d2df3bc5d3bfaa75.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/guardrails/page-63092ae43b1144df.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{91229:function(n,e,r){Promise.resolve().then(r.bind(r,49514))},30078:function(n,e,r){"use strict";r.d(e,{Ct:function(){return t.Z},Dx:function(){return p.Z},OK:function(){return l.Z},Zb:function(){return i.Z},nP:function(){return d.Z},oi:function(){return m.Z},rj:function(){return o.Z},td:function(){return a.Z},v0:function(){return c.Z},x4:function(){return s.Z},xv:function(){return f.Z},zx:function(){return u.Z}});var t=r(41649),u=r(20831),i=r(12514),o=r(67101),l=r(12485),c=r(18135),a=r(35242),s=r(29706),d=r(77991),f=r(84264),m=r(49566),p=r(96761)},16312:function(n,e,r){"use strict";r.d(e,{z:function(){return t.Z}});var t=r(20831)},71618:function(n,e,r){"use strict";r.d(e,{OK:function(){return u.Z},nP:function(){return c.Z},td:function(){return o.Z},v0:function(){return i.Z},x4:function(){return l.Z},zx:function(){return t.Z}});var t=r(20831),u=r(12485),i=r(18135),o=r(35242),l=r(29706),c=r(77991)},64504:function(n,e,r){"use strict";r.d(e,{o:function(){return u.Z},z:function(){return t.Z}});var t=r(20831),u=r(49566)},49514:function(n,e,r){"use strict";r.r(e);var t=r(57437),u=r(44734),i=r(39760);e.default=()=>{let{accessToken:n}=(0,i.Z)();return(0,t.jsx)(u.Z,{accessToken:n})}},39760:function(n,e,r){"use strict";var t=r(2265),u=r(99376),i=r(14474),o=r(3914);e.Z=()=>{var n,e,r,l,c,a,s;let d=(0,u.useRouter)(),f="undefined"!=typeof document?(0,o.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let m=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,i.o)(f)}catch(n){return(0,o.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(n=null==m?void 0:m.key)&&void 0!==n?n:null,userId:null!==(e=null==m?void 0:m.user_id)&&void 0!==e?e:null,userEmail:null!==(r=null==m?void 0:m.user_email)&&void 0!==r?r:null,userRole:function(n){if(!n)return"Undefined Role";switch(n.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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==m?void 0:m.user_role)&&void 0!==l?l:null),premiumUser:null!==(c=null==m?void 0:m.premium_user)&&void 0!==c?c:null,disabledPersonalKeyCreation:null!==(a=null==m?void 0:m.disabled_non_admin_personal_key_creation)&&void 0!==a?a:null,showSSOBanner:(null==m?void 0:m.login_method)==="username_password"}}},24199:function(n,e,r){"use strict";r.d(e,{Z:function(){return i}});var t=r(57437);r(2265);var u=r(30150),i=n=>{let{step:e=.01,style:r={width:"100%"},placeholder:i="Enter a numerical value",min:o,max:l,onChange:c,...a}=n;return(0,t.jsx)(u.Z,{onWheel:n=>n.currentTarget.blur(),step:e,style:r,placeholder:i,min:o,max:l,onChange:c,...a})}},59872:function(n,e,r){"use strict";r.d(e,{nl:function(){return u},pw:function(){return i},vQ:function(){return o}});var t=r(9114);function u(n,e){let r=structuredClone(n);for(let[n,t]of Object.entries(e))n in r&&(r[n]=t);return r}let i=function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==n||!Number.isFinite(n))return"-";let t={minimumFractionDigits:e,maximumFractionDigits:e};if(!r)return n.toLocaleString("en-US",t);let u=Math.abs(n),i=u,o="";return u>=1e6?(i=u/1e6,o="M"):u>=1e3&&(i=u/1e3,o="K"),"".concat(n<0?"-":"").concat(i.toLocaleString("en-US",t)).concat(o)},o=async function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!n)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return l(n,e);try{return await navigator.clipboard.writeText(n),t.Z.success(e),!0}catch(r){return console.error("Clipboard API failed: ",r),l(n,e)}},l=(n,e)=>{try{let r=document.createElement("textarea");r.value=n,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",r.setAttribute("readonly",""),document.body.appendChild(r),r.focus(),r.select();let u=document.execCommand("copy");if(document.body.removeChild(r),u)return t.Z.success(e),!0;throw Error("execCommand failed")}catch(n){return t.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",n),!1}}},20347:function(n,e,r){"use strict";r.d(e,{LQ:function(){return i},ZL:function(){return t},lo:function(){return u},tY:function(){return o}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],u=["Internal User","Internal Viewer"],i=["Internal User","Admin","proxy_admin"],o=n=>t.includes(n)}},function(n){n.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,2284,7908,9011,2945,169,5030,2522,8049,4734,2971,2117,1744],function(){return n(n.s=91229)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{91229:function(n,e,r){Promise.resolve().then(r.bind(r,49514))},30078:function(n,e,r){"use strict";r.d(e,{Ct:function(){return t.Z},Dx:function(){return p.Z},OK:function(){return l.Z},Zb:function(){return i.Z},nP:function(){return d.Z},oi:function(){return m.Z},rj:function(){return o.Z},td:function(){return a.Z},v0:function(){return c.Z},x4:function(){return s.Z},xv:function(){return f.Z},zx:function(){return u.Z}});var t=r(41649),u=r(20831),i=r(12514),o=r(67101),l=r(12485),c=r(18135),a=r(35242),s=r(29706),d=r(77991),f=r(84264),m=r(49566),p=r(96761)},16312:function(n,e,r){"use strict";r.d(e,{z:function(){return t.Z}});var t=r(20831)},71618:function(n,e,r){"use strict";r.d(e,{OK:function(){return u.Z},nP:function(){return c.Z},td:function(){return o.Z},v0:function(){return i.Z},x4:function(){return l.Z},zx:function(){return t.Z}});var t=r(20831),u=r(12485),i=r(18135),o=r(35242),l=r(29706),c=r(77991)},64504:function(n,e,r){"use strict";r.d(e,{o:function(){return u.Z},z:function(){return t.Z}});var t=r(20831),u=r(49566)},49514:function(n,e,r){"use strict";r.r(e);var t=r(57437),u=r(44734),i=r(80443);e.default=()=>{let{accessToken:n}=(0,i.Z)();return(0,t.jsx)(u.Z,{accessToken:n})}},80443:function(n,e,r){"use strict";var t=r(2265),u=r(99376),i=r(14474),o=r(3914);e.Z=()=>{var n,e,r,l,c,a,s;let d=(0,u.useRouter)(),f="undefined"!=typeof document?(0,o.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let m=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,i.o)(f)}catch(n){return(0,o.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(n=null==m?void 0:m.key)&&void 0!==n?n:null,userId:null!==(e=null==m?void 0:m.user_id)&&void 0!==e?e:null,userEmail:null!==(r=null==m?void 0:m.user_email)&&void 0!==r?r:null,userRole:function(n){if(!n)return"Undefined Role";switch(n.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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==m?void 0:m.user_role)&&void 0!==l?l:null),premiumUser:null!==(c=null==m?void 0:m.premium_user)&&void 0!==c?c:null,disabledPersonalKeyCreation:null!==(a=null==m?void 0:m.disabled_non_admin_personal_key_creation)&&void 0!==a?a:null,showSSOBanner:(null==m?void 0:m.login_method)==="username_password"}}},24199:function(n,e,r){"use strict";r.d(e,{Z:function(){return i}});var t=r(57437);r(2265);var u=r(30150),i=n=>{let{step:e=.01,style:r={width:"100%"},placeholder:i="Enter a numerical value",min:o,max:l,onChange:c,...a}=n;return(0,t.jsx)(u.Z,{onWheel:n=>n.currentTarget.blur(),step:e,style:r,placeholder:i,min:o,max:l,onChange:c,...a})}},59872:function(n,e,r){"use strict";r.d(e,{nl:function(){return u},pw:function(){return i},vQ:function(){return o}});var t=r(9114);function u(n,e){let r=structuredClone(n);for(let[n,t]of Object.entries(e))n in r&&(r[n]=t);return r}let i=function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==n||!Number.isFinite(n))return"-";let t={minimumFractionDigits:e,maximumFractionDigits:e};if(!r)return n.toLocaleString("en-US",t);let u=Math.abs(n),i=u,o="";return u>=1e6?(i=u/1e6,o="M"):u>=1e3&&(i=u/1e3,o="K"),"".concat(n<0?"-":"").concat(i.toLocaleString("en-US",t)).concat(o)},o=async function(n){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!n)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return l(n,e);try{return await navigator.clipboard.writeText(n),t.Z.success(e),!0}catch(r){return console.error("Clipboard API failed: ",r),l(n,e)}},l=(n,e)=>{try{let r=document.createElement("textarea");r.value=n,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",r.setAttribute("readonly",""),document.body.appendChild(r),r.focus(),r.select();let u=document.execCommand("copy");if(document.body.removeChild(r),u)return t.Z.success(e),!0;throw Error("execCommand failed")}catch(n){return t.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",n),!1}}},20347:function(n,e,r){"use strict";r.d(e,{LQ:function(){return i},ZL:function(){return t},lo:function(){return u},tY:function(){return o}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],u=["Internal User","Internal Viewer"],i=["Internal User","Admin","proxy_admin"],o=n=>t.includes(n)}},function(n){n.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,2284,7908,9011,2945,169,5030,2522,8049,4734,2971,2117,1744],function(){return n(n.s=91229)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js similarity index 98% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js index 9450ce3f332..63afbf6c2bb 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5642],{77935:function(e,t,r){Promise.resolve().then(r.bind(r,89219))},1309:function(e,t,r){"use strict";r.d(t,{C:function(){return n.Z}});var n=r(41649)},39760:function(e,t,r){"use strict";var n=r(2265),s=r(99376),a=r(14474),l=r(3914);t.Z=()=>{var e,t,r,o,i,c,u;let d=(0,s.useRouter)(),m="undefined"!=typeof document?(0,l.e)("token"):null;(0,n.useEffect)(()=>{m||d.replace("/sso/key/generate")},[m,d]);let x=(0,n.useMemo)(()=>{if(!m)return null;try{return(0,a.o)(m)}catch(e){return(0,l.b)(),d.replace("/sso/key/generate"),null}},[m,d]);return{token:m,accessToken:null!==(e=null==x?void 0:x.key)&&void 0!==e?e:null,userId:null!==(t=null==x?void 0:x.user_id)&&void 0!==t?t:null,userEmail:null!==(r=null==x?void 0:x.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(o=null==x?void 0:x.user_role)&&void 0!==o?o:null),premiumUser:null!==(i=null==x?void 0:x.premium_user)&&void 0!==i?i:null,disabledPersonalKeyCreation:null!==(c=null==x?void 0:x.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==x?void 0:x.login_method)==="username_password"}}},89219:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(57437),s=r(2265),a=r(65373),l=r(69734),o=r(92019),i=r(39760),c=r(99376);function u(e){let{children:t}=e;(0,c.useRouter)();let r=(0,c.useSearchParams)(),{accessToken:u,userRole:d,userId:m,userEmail:x,premiumUser:f}=(0,i.Z)(),[h,g]=s.useState(!1),[p,v]=(0,s.useState)(()=>r.get("page")||"api-keys");return(0,s.useEffect)(()=>{v(r.get("page")||"api-keys")},[r]),(0,n.jsx)(l.f,{accessToken:"",children:(0,n.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,n.jsx)(a.Z,{isPublicPage:!1,sidebarCollapsed:h,onToggleSidebar:()=>g(e=>!e),userID:m,userEmail:x,userRole:d,premiumUser:f,proxySettings:void 0,setProxySettings:()=>{},accessToken:u}),(0,n.jsxs)("div",{className:"flex flex-1 overflow-auto",children:[(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(o.Z,{defaultSelectedKey:p,accessToken:u,userRole:d})}),(0,n.jsx)("main",{className:"flex-1",children:t})]})]})})}!function(e){let t="ui/".trim();if(t)t.replace(/^\/+/,"").replace(/\/+$/,"")}(0)},29488:function(e,t,r){"use strict";r.d(t,{Hc:function(){return l},Ui:function(){return a},e4:function(){return o},xd:function(){return i}});let n="litellm_mcp_auth_tokens",s=()=>{try{let e=localStorage.getItem(n);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading MCP auth tokens from localStorage:",e),{}}},a=(e,t)=>{try{let r=s()[e];if(r&&r.serverAlias===t||r&&!t&&!r.serverAlias)return r.authValue;return null}catch(e){return console.error("Error getting MCP auth token:",e),null}},l=(e,t,r,a)=>{try{let l=s();l[e]={serverId:e,serverAlias:a,authValue:t,authType:r,timestamp:Date.now()},localStorage.setItem(n,JSON.stringify(l))}catch(e){console.error("Error storing MCP auth token:",e)}},o=e=>{try{let t=s();delete t[e],localStorage.setItem(n,JSON.stringify(t))}catch(e){console.error("Error removing MCP auth token:",e)}},i=()=>{try{localStorage.removeItem(n)}catch(e){console.error("Error clearing MCP auth tokens:",e)}}},65373:function(e,t,r){"use strict";r.d(t,{Z:function(){return N}});var n=r(57437),s=r(27648),a=r(2265),l=r(89970),o=r(63709),i=r(80795),c=r(19250),u=r(15883),d=r(46346),m=r(57400),x=r(91870),f=r(40428),h=r(83884),g=r(45524),p=r(3914);let v=async e=>{if(!e)return null;try{return await (0,c.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};var y=r(69734),j=r(29488),w=r(31857),N=e=>{let{userID:t,userEmail:r,userRole:N,premiumUser:_,proxySettings:b,setProxySettings:k,accessToken:S,isPublicPage:P=!1,sidebarCollapsed:E=!1,onToggleSidebar:C}=e,U=(0,c.getProxyBaseUrl)(),[I,Z]=(0,a.useState)(""),{logoUrl:R}=(0,y.F)(),{refactoredUIFlag:L,setRefactoredUIFlag:T}=(0,w.Z)();(0,a.useEffect)(()=>{(async()=>{if(S){let e=await v(S);console.log("response from fetchProxySettings",e),e&&k(e)}})()},[S]),(0,a.useEffect)(()=>{Z((null==b?void 0:b.PROXY_LOGOUT_URL)||"")},[b]);let O=[{key:"user-info",onClick:e=>{var t;return null===(t=e.domEvent)||void 0===t?void 0:t.stopPropagation()},label:(0,n.jsxs)("div",{className:"px-3 py-3 border-b border-gray-100",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(u.Z,{className:"mr-2 text-gray-700"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:t})]}),_?(0,n.jsx)(l.Z,{title:"Premium User",placement:"left",children:(0,n.jsxs)("div",{className:"flex items-center bg-gradient-to-r from-amber-500 to-yellow-500 text-white px-2 py-0.5 rounded-full cursor-help",children:[(0,n.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:"Premium"})]})}):(0,n.jsx)(l.Z,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,n.jsxs)("div",{className:"flex items-center bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full cursor-help",children:[(0,n.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:"Standard"})]})})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center text-sm",children:[(0,n.jsx)(m.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,n.jsx)("span",{className:"text-gray-500 text-xs",children:"Role"}),(0,n.jsx)("span",{className:"ml-auto text-gray-700 font-medium",children:N})]}),(0,n.jsxs)("div",{className:"flex items-center text-sm",children:[(0,n.jsx)(x.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,n.jsx)("span",{className:"text-gray-500 text-xs",children:"Email"}),(0,n.jsx)("span",{className:"ml-auto text-gray-700 font-medium truncate max-w-[150px]",title:r||"Unknown",children:r||"Unknown"})]}),(0,n.jsxs)("div",{className:"flex items-center text-sm pt-2 mt-2 border-t border-gray-100",children:[(0,n.jsx)("span",{className:"text-gray-500 text-xs",children:"Refactored UI"}),(0,n.jsx)(o.Z,{className:"ml-auto",size:"small",checked:L,onChange:e=>T(e),"aria-label":"Toggle refactored UI feature flag"})]})]})]})},{key:"logout",label:(0,n.jsxs)("div",{className:"flex items-center py-2 px-3 hover:bg-gray-50 rounded-md mx-1 my-1",onClick:()=>{(0,p.b)(),(0,j.xd)(),window.location.href=I},children:[(0,n.jsx)(f.Z,{className:"mr-3 text-gray-600"}),(0,n.jsx)("span",{className:"text-gray-800",children:"Logout"})]})}];return(0,n.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,n.jsx)("div",{className:"w-full",children:(0,n.jsxs)("div",{className:"flex items-center h-14 px-4",children:[" ",(0,n.jsxs)("div",{className:"flex items-center flex-shrink-0",children:[C&&(0,n.jsx)("button",{onClick:C,className:"flex items-center justify-center w-10 h-10 mr-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded transition-colors",title:E?"Expand sidebar":"Collapse sidebar",children:(0,n.jsx)("span",{className:"text-lg",children:E?(0,n.jsx)(h.Z,{}):(0,n.jsx)(g.Z,{})})}),(0,n.jsx)(s.default,{href:"/",className:"flex items-center",children:(0,n.jsx)("img",{src:R||"".concat(U,"/get_image"),alt:"LiteLLM Brand",className:"h-10 w-auto"})})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,n.jsx)("a",{href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-gray-600 hover:text-gray-900 transition-colors",children:"Docs"}),!P&&(0,n.jsx)(i.Z,{menu:{items:O,className:"min-w-[200px]",style:{padding:"8px",marginTop:"8px",borderRadius:"12px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.08)"}},overlayStyle:{minWidth:"200px"},children:(0,n.jsxs)("button",{className:"inline-flex items-center text-sm text-gray-600 hover:text-gray-900 transition-colors",children:["User",(0,n.jsx)("svg",{className:"ml-1 w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 9l-7 7-7-7"})})]})})]})]})})})}},69734:function(e,t,r){"use strict";r.d(t,{F:function(){return o},f:function(){return i}});var n=r(57437),s=r(2265),a=r(19250);let l=(0,s.createContext)(void 0),o=()=>{let e=(0,s.useContext)(l);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},i=e=>{let{children:t,accessToken:r}=e,[o,i]=(0,s.useState)(null);return(0,s.useEffect)(()=>{(async()=>{try{let t=(0,a.getProxyBaseUrl)(),r=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{"Content-Type":"application/json"}});if(r.ok){var e;let t=await r.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&i(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[]),(0,n.jsx)(l.Provider,{value:{logoUrl:o,setLogoUrl:i},children:t})}},31857:function(e,t,r){"use strict";r.d(t,{FeatureFlagsProvider:function(){return d}});var n=r(57437),s=r(2265),a=r(99376),l=r(19250);let o=()=>{let e="ui/".replace(/^\/+|\/+$/g,""),t=e?"/".concat(e,"/"):"/";if(l.serverRootPath&&"/"!==l.serverRootPath){let e=l.serverRootPath.replace(/\/+$/,""),r=t.replace(/^\/+/,"");return"".concat(e,"/").concat(r)}return t},i="feature.refactoredUIFlag",c=(0,s.createContext)(null);function u(e){try{localStorage.setItem(i,String(e))}catch(e){}}let d=e=>{let{children:t}=e,r=(0,a.useRouter)(),[l,d]=(0,s.useState)(()=>(function(){try{let e=localStorage.getItem(i);if(null===e)return localStorage.setItem(i,"false"),!1;let t=e.trim().toLowerCase();if("true"===t||"1"===t)return!0;if("false"===t||"0"===t)return!1;let r=JSON.parse(e);if("boolean"==typeof r)return r;return localStorage.setItem(i,"false"),!1}catch(e){try{localStorage.setItem(i,"false")}catch(e){}return!1}})());return(0,s.useEffect)(()=>{let e=e=>{if(e.key===i&&null!=e.newValue){let t=e.newValue.trim().toLowerCase();d("true"===t||"1"===t)}e.key===i&&null===e.newValue&&(u(!1),d(!1))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]),(0,s.useEffect)(()=>{if(l)return;let e=setTimeout(()=>{let e;let t=o(),n=(e=window.location.pathname).endsWith("/")?e:e+"/";n.includes("/ui")||n===t||r.replace(t)},100);return()=>clearTimeout(e)},[l,r]),(0,n.jsx)(c.Provider,{value:{refactoredUIFlag:l,setRefactoredUIFlag:e=>{d(e),u(e)}},children:t})};t.Z=()=>{let e=(0,s.useContext)(c);if(!e)throw Error("useFeatureFlags must be used within FeatureFlagsProvider");return e}},20347:function(e,t,r){"use strict";r.d(t,{LQ:function(){return a},ZL:function(){return n},lo:function(){return s},tY:function(){return l}});let n=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],s=["Internal User","Internal Viewer"],a=["Internal User","Admin","proxy_admin"],l=e=>n.includes(e)}},function(e){e.O(0,[1114,1491,4556,3709,1529,3603,9165,8098,8049,2019,2971,2117,1744],function(){return e(e.s=77935)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5642],{77935:function(e,t,r){Promise.resolve().then(r.bind(r,89219))},1309:function(e,t,r){"use strict";r.d(t,{C:function(){return n.Z}});var n=r(41649)},80443:function(e,t,r){"use strict";var n=r(2265),s=r(99376),a=r(14474),l=r(3914);t.Z=()=>{var e,t,r,o,i,c,u;let d=(0,s.useRouter)(),m="undefined"!=typeof document?(0,l.e)("token"):null;(0,n.useEffect)(()=>{m||d.replace("/sso/key/generate")},[m,d]);let x=(0,n.useMemo)(()=>{if(!m)return null;try{return(0,a.o)(m)}catch(e){return(0,l.b)(),d.replace("/sso/key/generate"),null}},[m,d]);return{token:m,accessToken:null!==(e=null==x?void 0:x.key)&&void 0!==e?e:null,userId:null!==(t=null==x?void 0:x.user_id)&&void 0!==t?t:null,userEmail:null!==(r=null==x?void 0:x.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(o=null==x?void 0:x.user_role)&&void 0!==o?o:null),premiumUser:null!==(i=null==x?void 0:x.premium_user)&&void 0!==i?i:null,disabledPersonalKeyCreation:null!==(c=null==x?void 0:x.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==x?void 0:x.login_method)==="username_password"}}},89219:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(57437),s=r(2265),a=r(65373),l=r(69734),o=r(92019),i=r(80443),c=r(99376);function u(e){let{children:t}=e;(0,c.useRouter)();let r=(0,c.useSearchParams)(),{accessToken:u,userRole:d,userId:m,userEmail:x,premiumUser:f}=(0,i.Z)(),[h,g]=s.useState(!1),[p,v]=(0,s.useState)(()=>r.get("page")||"api-keys");return(0,s.useEffect)(()=>{v(r.get("page")||"api-keys")},[r]),(0,n.jsx)(l.f,{accessToken:"",children:(0,n.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,n.jsx)(a.Z,{isPublicPage:!1,sidebarCollapsed:h,onToggleSidebar:()=>g(e=>!e),userID:m,userEmail:x,userRole:d,premiumUser:f,proxySettings:void 0,setProxySettings:()=>{},accessToken:u}),(0,n.jsxs)("div",{className:"flex flex-1 overflow-auto",children:[(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)(o.Z,{defaultSelectedKey:p,accessToken:u,userRole:d})}),(0,n.jsx)("main",{className:"flex-1",children:t})]})]})})}!function(e){let t="ui/".trim();if(t)t.replace(/^\/+/,"").replace(/\/+$/,"")}(0)},29488:function(e,t,r){"use strict";r.d(t,{Hc:function(){return l},Ui:function(){return a},e4:function(){return o},xd:function(){return i}});let n="litellm_mcp_auth_tokens",s=()=>{try{let e=localStorage.getItem(n);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading MCP auth tokens from localStorage:",e),{}}},a=(e,t)=>{try{let r=s()[e];if(r&&r.serverAlias===t||r&&!t&&!r.serverAlias)return r.authValue;return null}catch(e){return console.error("Error getting MCP auth token:",e),null}},l=(e,t,r,a)=>{try{let l=s();l[e]={serverId:e,serverAlias:a,authValue:t,authType:r,timestamp:Date.now()},localStorage.setItem(n,JSON.stringify(l))}catch(e){console.error("Error storing MCP auth token:",e)}},o=e=>{try{let t=s();delete t[e],localStorage.setItem(n,JSON.stringify(t))}catch(e){console.error("Error removing MCP auth token:",e)}},i=()=>{try{localStorage.removeItem(n)}catch(e){console.error("Error clearing MCP auth tokens:",e)}}},65373:function(e,t,r){"use strict";r.d(t,{Z:function(){return N}});var n=r(57437),s=r(27648),a=r(2265),l=r(89970),o=r(63709),i=r(80795),c=r(19250),u=r(15883),d=r(46346),m=r(57400),x=r(91870),f=r(40428),h=r(83884),g=r(45524),p=r(3914);let v=async e=>{if(!e)return null;try{return await (0,c.getProxyUISettings)(e)}catch(e){return console.error("Error fetching proxy settings:",e),null}};var y=r(69734),j=r(29488),w=r(31857),N=e=>{let{userID:t,userEmail:r,userRole:N,premiumUser:_,proxySettings:b,setProxySettings:k,accessToken:S,isPublicPage:P=!1,sidebarCollapsed:E=!1,onToggleSidebar:C}=e,U=(0,c.getProxyBaseUrl)(),[I,Z]=(0,a.useState)(""),{logoUrl:R}=(0,y.F)(),{refactoredUIFlag:L,setRefactoredUIFlag:T}=(0,w.Z)();(0,a.useEffect)(()=>{(async()=>{if(S){let e=await v(S);console.log("response from fetchProxySettings",e),e&&k(e)}})()},[S]),(0,a.useEffect)(()=>{Z((null==b?void 0:b.PROXY_LOGOUT_URL)||"")},[b]);let O=[{key:"user-info",onClick:e=>{var t;return null===(t=e.domEvent)||void 0===t?void 0:t.stopPropagation()},label:(0,n.jsxs)("div",{className:"px-3 py-3 border-b border-gray-100",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)(u.Z,{className:"mr-2 text-gray-700"}),(0,n.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:t})]}),_?(0,n.jsx)(l.Z,{title:"Premium User",placement:"left",children:(0,n.jsxs)("div",{className:"flex items-center bg-gradient-to-r from-amber-500 to-yellow-500 text-white px-2 py-0.5 rounded-full cursor-help",children:[(0,n.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:"Premium"})]})}):(0,n.jsx)(l.Z,{title:"Upgrade to Premium for advanced features",placement:"left",children:(0,n.jsxs)("div",{className:"flex items-center bg-gray-100 text-gray-500 px-2 py-0.5 rounded-full cursor-help",children:[(0,n.jsx)(d.Z,{className:"mr-1 text-xs"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:"Standard"})]})})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex items-center text-sm",children:[(0,n.jsx)(m.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,n.jsx)("span",{className:"text-gray-500 text-xs",children:"Role"}),(0,n.jsx)("span",{className:"ml-auto text-gray-700 font-medium",children:N})]}),(0,n.jsxs)("div",{className:"flex items-center text-sm",children:[(0,n.jsx)(x.Z,{className:"mr-2 text-gray-400 text-xs"}),(0,n.jsx)("span",{className:"text-gray-500 text-xs",children:"Email"}),(0,n.jsx)("span",{className:"ml-auto text-gray-700 font-medium truncate max-w-[150px]",title:r||"Unknown",children:r||"Unknown"})]}),(0,n.jsxs)("div",{className:"flex items-center text-sm pt-2 mt-2 border-t border-gray-100",children:[(0,n.jsx)("span",{className:"text-gray-500 text-xs",children:"Refactored UI"}),(0,n.jsx)(o.Z,{className:"ml-auto",size:"small",checked:L,onChange:e=>T(e),"aria-label":"Toggle refactored UI feature flag"})]})]})]})},{key:"logout",label:(0,n.jsxs)("div",{className:"flex items-center py-2 px-3 hover:bg-gray-50 rounded-md mx-1 my-1",onClick:()=>{(0,p.b)(),(0,j.xd)(),window.location.href=I},children:[(0,n.jsx)(f.Z,{className:"mr-3 text-gray-600"}),(0,n.jsx)("span",{className:"text-gray-800",children:"Logout"})]})}];return(0,n.jsx)("nav",{className:"bg-white border-b border-gray-200 sticky top-0 z-10",children:(0,n.jsx)("div",{className:"w-full",children:(0,n.jsxs)("div",{className:"flex items-center h-14 px-4",children:[" ",(0,n.jsxs)("div",{className:"flex items-center flex-shrink-0",children:[C&&(0,n.jsx)("button",{onClick:C,className:"flex items-center justify-center w-10 h-10 mr-2 text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded transition-colors",title:E?"Expand sidebar":"Collapse sidebar",children:(0,n.jsx)("span",{className:"text-lg",children:E?(0,n.jsx)(h.Z,{}):(0,n.jsx)(g.Z,{})})}),(0,n.jsx)(s.default,{href:"/",className:"flex items-center",children:(0,n.jsx)("img",{src:R||"".concat(U,"/get_image"),alt:"LiteLLM Brand",className:"h-10 w-auto"})})]}),(0,n.jsxs)("div",{className:"flex items-center space-x-5 ml-auto",children:[(0,n.jsx)("a",{href:"https://docs.litellm.ai/docs/",target:"_blank",rel:"noopener noreferrer",className:"text-sm text-gray-600 hover:text-gray-900 transition-colors",children:"Docs"}),!P&&(0,n.jsx)(i.Z,{menu:{items:O,className:"min-w-[200px]",style:{padding:"8px",marginTop:"8px",borderRadius:"12px",boxShadow:"0 4px 24px rgba(0, 0, 0, 0.08)"}},overlayStyle:{minWidth:"200px"},children:(0,n.jsxs)("button",{className:"inline-flex items-center text-sm text-gray-600 hover:text-gray-900 transition-colors",children:["User",(0,n.jsx)("svg",{className:"ml-1 w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M19 9l-7 7-7-7"})})]})})]})]})})})}},69734:function(e,t,r){"use strict";r.d(t,{F:function(){return o},f:function(){return i}});var n=r(57437),s=r(2265),a=r(19250);let l=(0,s.createContext)(void 0),o=()=>{let e=(0,s.useContext)(l);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},i=e=>{let{children:t,accessToken:r}=e,[o,i]=(0,s.useState)(null);return(0,s.useEffect)(()=>{(async()=>{try{let t=(0,a.getProxyBaseUrl)(),r=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{"Content-Type":"application/json"}});if(r.ok){var e;let t=await r.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&i(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[]),(0,n.jsx)(l.Provider,{value:{logoUrl:o,setLogoUrl:i},children:t})}},31857:function(e,t,r){"use strict";r.d(t,{FeatureFlagsProvider:function(){return d}});var n=r(57437),s=r(2265),a=r(99376),l=r(19250);let o=()=>{let e="ui/".replace(/^\/+|\/+$/g,""),t=e?"/".concat(e,"/"):"/";if(l.serverRootPath&&"/"!==l.serverRootPath){let e=l.serverRootPath.replace(/\/+$/,""),r=t.replace(/^\/+/,"");return"".concat(e,"/").concat(r)}return t},i="feature.refactoredUIFlag",c=(0,s.createContext)(null);function u(e){try{localStorage.setItem(i,String(e))}catch(e){}}let d=e=>{let{children:t}=e,r=(0,a.useRouter)(),[l,d]=(0,s.useState)(()=>(function(){try{let e=localStorage.getItem(i);if(null===e)return localStorage.setItem(i,"false"),!1;let t=e.trim().toLowerCase();if("true"===t||"1"===t)return!0;if("false"===t||"0"===t)return!1;let r=JSON.parse(e);if("boolean"==typeof r)return r;return localStorage.setItem(i,"false"),!1}catch(e){try{localStorage.setItem(i,"false")}catch(e){}return!1}})());return(0,s.useEffect)(()=>{let e=e=>{if(e.key===i&&null!=e.newValue){let t=e.newValue.trim().toLowerCase();d("true"===t||"1"===t)}e.key===i&&null===e.newValue&&(u(!1),d(!1))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]),(0,s.useEffect)(()=>{if(l)return;let e=setTimeout(()=>{let e;let t=o(),n=(e=window.location.pathname).endsWith("/")?e:e+"/";n.includes("/ui")||n===t||r.replace(t)},100);return()=>clearTimeout(e)},[l,r]),(0,n.jsx)(c.Provider,{value:{refactoredUIFlag:l,setRefactoredUIFlag:e=>{d(e),u(e)}},children:t})};t.Z=()=>{let e=(0,s.useContext)(c);if(!e)throw Error("useFeatureFlags must be used within FeatureFlagsProvider");return e}},20347:function(e,t,r){"use strict";r.d(t,{LQ:function(){return a},ZL:function(){return n},lo:function(){return s},tY:function(){return l}});let n=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],s=["Internal User","Internal Viewer"],a=["Internal User","Admin","proxy_admin"],l=e=>n.includes(e)}},function(e){e.O(0,[1114,1491,4556,3709,1529,3603,9165,8098,8049,2019,2971,2117,1744],function(){return e(e.s=77935)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/logs/page-6742dc43acdb7688.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/logs/page-2b891c389c7bd5fc.js similarity index 98% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/logs/page-6742dc43acdb7688.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/logs/page-2b891c389c7bd5fc.js index ead0152ce19..9b1bca72cae 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/logs/page-6742dc43acdb7688.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/logs/page-2b891c389c7bd5fc.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2100],{15956:function(e,n,o){Promise.resolve().then(o.bind(o,19056))},19130:function(e,n,o){"use strict";o.d(n,{RM:function(){return t.Z},SC:function(){return c.Z},iA:function(){return r.Z},pj:function(){return a.Z},ss:function(){return i.Z},xs:function(){return l.Z}});var r=o(21626),t=o(97214),a=o(28241),i=o(58834),l=o(69552),c=o(71876)},11318:function(e,n,o){"use strict";o.d(n,{Z:function(){return l}});var r=o(2265),t=o(39760),a=o(19250);let i=async(e,n,o,r)=>"Admin"!=o&&"Admin Viewer"!=o?await (0,a.teamListCall)(e,(null==r?void 0:r.organization_id)||null,n):await (0,a.teamListCall)(e,(null==r?void 0:r.organization_id)||null);var l=()=>{let[e,n]=(0,r.useState)([]),{accessToken:o,userId:a,userRole:l}=(0,t.Z)();return(0,r.useEffect)(()=>{(async()=>{n(await i(o,a,l,null))})()},[o,a,l]),{teams:e,setTeams:n}}},19056:function(e,n,o){"use strict";o.r(n);var r=o(57437),t=o(33801),a=o(39760),i=o(11318),l=o(21623),c=o(29827);n.default=()=>{let{accessToken:e,token:n,userRole:o,userId:s,premiumUser:u}=(0,a.Z)(),{teams:p}=(0,i.Z)(),d=new l.S;return(0,r.jsx)(c.aH,{client:d,children:(0,r.jsx)(t.Z,{accessToken:e,token:n,userRole:o,userID:s,allTeams:p||[],premiumUser:u})})}},42673:function(e,n,o){"use strict";var r,t;o.d(n,{Cl:function(){return r},bK:function(){return u},cd:function(){return l},dr:function(){return c},fK:function(){return a},ph:function(){return s}}),(t=r||(r={})).AIML="AI/ML API",t.Bedrock="Amazon Bedrock",t.Anthropic="Anthropic",t.AssemblyAI="AssemblyAI",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.Cerebras="Cerebras",t.Cohere="Cohere",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.ElevenLabs="ElevenLabs",t.FalAI="Fal AI",t.FireworksAI="Fireworks AI",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.Hosted_Vllm="vllm",t.Infinity="Infinity",t.JinaAI="Jina AI",t.MistralAI="Mistral AI",t.Ollama="Ollama",t.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.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.Perplexity="Perplexity",t.Sambanova="Sambanova",t.Snowflake="Snowflake",t.TogetherAI="TogetherAI",t.Triton="Triton",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.xAI="xAI";let a={AIML:"aiml",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",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity"},i="/ui/assets/logos/",l={"AI/ML API":"".concat(i,"aiml_api.svg"),Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),"Databricks (Qwen API)":"".concat(i,"databricks.svg"),Dashscope:"".concat(i,"dashscope.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),vllm:"".concat(i,"vllm.png"),Infinity:"".concat(i,"infinity.png"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(i,"oracle.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),Snowflake:"".concat(i,"snowflake.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Fal AI":"".concat(i,"fal_ai.jpg"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},c=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:l[e],displayName:e}}let n=Object.keys(a).find(n=>a[n].toLowerCase()===e.toLowerCase());if(!n)return{logo:"",displayName:e};let o=r[n];return{logo:l[o],displayName:o}},s=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"azure/my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else return"gpt-3.5-turbo"},u=(e,n)=>{console.log("Provider key: ".concat(e));let o=a[e];console.log("Provider mapped to: ".concat(o));let r=[];return e&&"object"==typeof n&&(Object.entries(n).forEach(e=>{let[n,t]=e;null!==t&&"object"==typeof t&&"litellm_provider"in t&&(t.litellm_provider===o||t.litellm_provider.includes(o))&&r.push(n)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(n).forEach(e=>{let[n,o]=e;null!==o&&"object"==typeof o&&"litellm_provider"in o&&"cohere_chat"===o.litellm_provider&&r.push(n)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(n).forEach(e=>{let[n,o]=e;null!==o&&"object"==typeof o&&"litellm_provider"in o&&"sagemaker_chat"===o.litellm_provider&&r.push(n)}))),r}},12322:function(e,n,o){"use strict";o.d(n,{w:function(){return c}});var r=o(57437),t=o(2265),a=o(71594),i=o(24525),l=o(19130);function c(e){let{data:n=[],columns:o,getRowCanExpand:c,renderSubComponent:s,isLoading:u=!1,loadingMessage:p="\uD83D\uDE85 Loading logs...",noDataMessage:d="No logs found"}=e,g=(0,a.b7)({data:n,columns:o,getRowCanExpand:c,getRowId:(e,n)=>{var o;return null!==(o=null==e?void 0:e.request_id)&&void 0!==o?o:String(n)},getCoreRowModel:(0,i.sC)(),getExpandedRowModel:(0,i.rV)()});return(0,r.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,r.jsxs)(l.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,r.jsx)(l.ss,{children:g.getHeaderGroups().map(e=>(0,r.jsx)(l.SC,{children:e.headers.map(e=>(0,r.jsx)(l.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,a.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,r.jsx)(l.RM,{children:u?(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:o.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:p})})})}):g.getRowModel().rows.length>0?g.getRowModel().rows.map(e=>(0,r.jsxs)(t.Fragment,{children:[(0,r.jsx)(l.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,r.jsx)(l.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,r.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:s({row:e})})})})]},e.id)):(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:o.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:d})})})})})]})})}}},function(e){e.O(0,[6990,1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,5188,1264,1116,8049,131,2202,874,4292,3801,2971,2117,1744],function(){return e(e.s=15956)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2100],{15956:function(e,n,o){Promise.resolve().then(o.bind(o,19056))},19130:function(e,n,o){"use strict";o.d(n,{RM:function(){return t.Z},SC:function(){return c.Z},iA:function(){return r.Z},pj:function(){return a.Z},ss:function(){return i.Z},xs:function(){return l.Z}});var r=o(21626),t=o(97214),a=o(28241),i=o(58834),l=o(69552),c=o(71876)},11318:function(e,n,o){"use strict";o.d(n,{Z:function(){return l}});var r=o(2265),t=o(80443),a=o(19250);let i=async(e,n,o,r)=>"Admin"!=o&&"Admin Viewer"!=o?await (0,a.teamListCall)(e,(null==r?void 0:r.organization_id)||null,n):await (0,a.teamListCall)(e,(null==r?void 0:r.organization_id)||null);var l=()=>{let[e,n]=(0,r.useState)([]),{accessToken:o,userId:a,userRole:l}=(0,t.Z)();return(0,r.useEffect)(()=>{(async()=>{n(await i(o,a,l,null))})()},[o,a,l]),{teams:e,setTeams:n}}},19056:function(e,n,o){"use strict";o.r(n);var r=o(57437),t=o(33801),a=o(80443),i=o(11318),l=o(21623),c=o(29827);n.default=()=>{let{accessToken:e,token:n,userRole:o,userId:s,premiumUser:u}=(0,a.Z)(),{teams:p}=(0,i.Z)(),d=new l.S;return(0,r.jsx)(c.aH,{client:d,children:(0,r.jsx)(t.Z,{accessToken:e,token:n,userRole:o,userID:s,allTeams:p||[],premiumUser:u})})}},42673:function(e,n,o){"use strict";var r,t;o.d(n,{Cl:function(){return r},bK:function(){return u},cd:function(){return l},dr:function(){return c},fK:function(){return a},ph:function(){return s}}),(t=r||(r={})).AIML="AI/ML API",t.Bedrock="Amazon Bedrock",t.Anthropic="Anthropic",t.AssemblyAI="AssemblyAI",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.Cerebras="Cerebras",t.Cohere="Cohere",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.ElevenLabs="ElevenLabs",t.FalAI="Fal AI",t.FireworksAI="Fireworks AI",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.Hosted_Vllm="vllm",t.Infinity="Infinity",t.JinaAI="Jina AI",t.MistralAI="Mistral AI",t.Ollama="Ollama",t.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.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.Perplexity="Perplexity",t.Sambanova="Sambanova",t.Snowflake="Snowflake",t.TogetherAI="TogetherAI",t.Triton="Triton",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.xAI="xAI";let a={AIML:"aiml",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",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity"},i="/ui/assets/logos/",l={"AI/ML API":"".concat(i,"aiml_api.svg"),Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),"Databricks (Qwen API)":"".concat(i,"databricks.svg"),Dashscope:"".concat(i,"dashscope.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),vllm:"".concat(i,"vllm.png"),Infinity:"".concat(i,"infinity.png"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(i,"oracle.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),Snowflake:"".concat(i,"snowflake.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Fal AI":"".concat(i,"fal_ai.jpg"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},c=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:l[e],displayName:e}}let n=Object.keys(a).find(n=>a[n].toLowerCase()===e.toLowerCase());if(!n)return{logo:"",displayName:e};let o=r[n];return{logo:l[o],displayName:o}},s=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"azure/my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else return"gpt-3.5-turbo"},u=(e,n)=>{console.log("Provider key: ".concat(e));let o=a[e];console.log("Provider mapped to: ".concat(o));let r=[];return e&&"object"==typeof n&&(Object.entries(n).forEach(e=>{let[n,t]=e;null!==t&&"object"==typeof t&&"litellm_provider"in t&&(t.litellm_provider===o||t.litellm_provider.includes(o))&&r.push(n)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(n).forEach(e=>{let[n,o]=e;null!==o&&"object"==typeof o&&"litellm_provider"in o&&"cohere_chat"===o.litellm_provider&&r.push(n)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(n).forEach(e=>{let[n,o]=e;null!==o&&"object"==typeof o&&"litellm_provider"in o&&"sagemaker_chat"===o.litellm_provider&&r.push(n)}))),r}},12322:function(e,n,o){"use strict";o.d(n,{w:function(){return c}});var r=o(57437),t=o(2265),a=o(71594),i=o(24525),l=o(19130);function c(e){let{data:n=[],columns:o,getRowCanExpand:c,renderSubComponent:s,isLoading:u=!1,loadingMessage:p="\uD83D\uDE85 Loading logs...",noDataMessage:d="No logs found"}=e,g=(0,a.b7)({data:n,columns:o,getRowCanExpand:c,getRowId:(e,n)=>{var o;return null!==(o=null==e?void 0:e.request_id)&&void 0!==o?o:String(n)},getCoreRowModel:(0,i.sC)(),getExpandedRowModel:(0,i.rV)()});return(0,r.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,r.jsxs)(l.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,r.jsx)(l.ss,{children:g.getHeaderGroups().map(e=>(0,r.jsx)(l.SC,{children:e.headers.map(e=>(0,r.jsx)(l.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,a.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,r.jsx)(l.RM,{children:u?(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:o.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:p})})})}):g.getRowModel().rows.length>0?g.getRowModel().rows.map(e=>(0,r.jsxs)(t.Fragment,{children:[(0,r.jsx)(l.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,r.jsx)(l.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,r.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:s({row:e})})})})]},e.id)):(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:o.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:d})})})})})]})})}}},function(e){e.O(0,[6990,1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,5188,1264,1116,8049,131,2202,874,4292,3801,2971,2117,1744],function(){return e(e.s=15956)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/model-hub/page-6666e51939068e37.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/model-hub/page-e19022cda2b01bb4.js similarity index 98% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/model-hub/page-6666e51939068e37.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/model-hub/page-e19022cda2b01bb4.js index 87e120516ba..ed80be1c047 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/model-hub/page-6666e51939068e37.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/model-hub/page-e19022cda2b01bb4.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2678],{24181:function(e,t,r){Promise.resolve().then(r.bind(r,30615))},23639:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(1119),i=r(2265),o={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"},a=r(55015),s=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:o}))})},41649:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var n=r(5853),i=r(2265),o=r(1526),a=r(7084),s=r(26898),u=r(97324),c=r(1153);let l={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,c.fn)("Badge"),p=i.forwardRef((e,t)=>{let{color:r,icon:p,size:h=a.u8.SM,tooltip:m,className:w,children:g}=e,v=(0,n._T)(e,["color","icon","size","tooltip","className","children"]),k=p||null,{tooltipProps:x,getReferenceProps:b}=(0,o.l)();return i.createElement("span",Object.assign({ref:(0,c.lq)([t,x.refs.setReference]),className:(0,u.q)(f("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-full",r?(0,u.q)((0,c.bM)(r,s.K.background).bgColor,(0,c.bM)(r,s.K.text).textColor,"bg-opacity-20 dark:bg-opacity-25"):(0,u.q)("bg-tremor-brand-muted text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted dark:text-dark-tremor-brand-emphasis"),l[h].paddingX,l[h].paddingY,l[h].fontSize,w)},b,v),i.createElement(o.Z,Object.assign({text:m},x)),k?i.createElement(k,{className:(0,u.q)(f("icon"),"shrink-0 -ml-1 mr-1.5",d[h].height,d[h].width)}):null,i.createElement("p",{className:(0,u.q)(f("text"),"text-sm whitespace-nowrap")},g))});p.displayName="Badge"},28617:function(e,t,r){"use strict";var n=r(2265),i=r(27380),o=r(51646),a=r(6543);t.Z=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,n.useRef)({}),r=(0,o.Z)(),s=(0,a.ZP)();return(0,i.Z)(()=>{let n=s.subscribe(n=>{t.current=n,e&&r()});return()=>s.unsubscribe(n)},[]),t.current}},78867:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},33245:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},95704:function(e,t,r){"use strict";r.d(t,{Dx:function(){return d.Z},RM:function(){return o.Z},SC:function(){return c.Z},Zb:function(){return n.Z},iA:function(){return i.Z},pj:function(){return a.Z},ss:function(){return s.Z},xs:function(){return u.Z},xv:function(){return l.Z}});var n=r(12514),i=r(21626),o=r(97214),a=r(28241),s=r(58834),u=r(69552),c=r(71876),l=r(84264),d=r(96761)},39760:function(e,t,r){"use strict";var n=r(2265),i=r(99376),o=r(14474),a=r(3914);t.Z=()=>{var e,t,r,s,u,c,l;let d=(0,i.useRouter)(),f="undefined"!=typeof document?(0,a.e)("token"):null;(0,n.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let p=(0,n.useMemo)(()=>{if(!f)return null;try{return(0,o.o)(f)}catch(e){return(0,a.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==p?void 0:p.key)&&void 0!==e?e:null,userId:null!==(t=null==p?void 0:p.user_id)&&void 0!==t?t:null,userEmail:null!==(r=null==p?void 0:p.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(s=null==p?void 0:p.user_role)&&void 0!==s?s:null),premiumUser:null!==(u=null==p?void 0:p.premium_user)&&void 0!==u?u:null,disabledPersonalKeyCreation:null!==(c=null==p?void 0:p.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==p?void 0:p.login_method)==="username_password"}}},30615:function(e,t,r){"use strict";r.r(t);var n=r(57437),i=r(18160),o=r(39760);t.default=()=>{let{accessToken:e,premiumUser:t,userRole:r}=(0,o.Z)();return(0,n.jsx)(i.Z,{accessToken:e,publicPage:!1,premiumUser:t,userRole:r})}},20347:function(e,t,r){"use strict";r.d(t,{LQ:function(){return o},ZL:function(){return n},lo:function(){return i},tY:function(){return a}});let n=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],i=["Internal User","Internal Viewer"],o=["Internal User","Admin","proxy_admin"],a=e=>n.includes(e)},86462:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});t.Z=i},47686:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});t.Z=i},44633:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});t.Z=i},3477:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});t.Z=i},93416:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=i},77355:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=i},17732:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});t.Z=i},14474:function(e,t,r){"use strict";r.d(t,{o:function(){return i}});class n extends Error{}function i(e,t){let r;if("string"!=typeof e)throw new n("Invalid token specified: must be a string");t||(t={});let i=!0===t.header?0:1,o=e.split(".")[i];if("string"!=typeof o)throw new n(`Invalid token specified: missing part #${i+1}`);try{r=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 r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(o)}catch(e){throw new n(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new n(`Invalid token specified: invalid json for part #${i+1} (${e.message})`)}}n.prototype.name="InvalidTokenError"}},function(e){e.O(0,[1114,1491,4556,2417,3709,2525,1529,2284,9011,3603,7906,9165,169,8049,2162,8160,2971,2117,1744],function(){return e(e.s=24181)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2678],{24181:function(e,t,r){Promise.resolve().then(r.bind(r,30615))},23639:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(1119),i=r(2265),o={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"},a=r(55015),s=i.forwardRef(function(e,t){return i.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:o}))})},41649:function(e,t,r){"use strict";r.d(t,{Z:function(){return p}});var n=r(5853),i=r(2265),o=r(1526),a=r(7084),s=r(26898),u=r(97324),c=r(1153);let l={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,c.fn)("Badge"),p=i.forwardRef((e,t)=>{let{color:r,icon:p,size:h=a.u8.SM,tooltip:m,className:w,children:g}=e,v=(0,n._T)(e,["color","icon","size","tooltip","className","children"]),k=p||null,{tooltipProps:x,getReferenceProps:b}=(0,o.l)();return i.createElement("span",Object.assign({ref:(0,c.lq)([t,x.refs.setReference]),className:(0,u.q)(f("root"),"w-max flex-shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-full",r?(0,u.q)((0,c.bM)(r,s.K.background).bgColor,(0,c.bM)(r,s.K.text).textColor,"bg-opacity-20 dark:bg-opacity-25"):(0,u.q)("bg-tremor-brand-muted text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted dark:text-dark-tremor-brand-emphasis"),l[h].paddingX,l[h].paddingY,l[h].fontSize,w)},b,v),i.createElement(o.Z,Object.assign({text:m},x)),k?i.createElement(k,{className:(0,u.q)(f("icon"),"shrink-0 -ml-1 mr-1.5",d[h].height,d[h].width)}):null,i.createElement("p",{className:(0,u.q)(f("text"),"text-sm whitespace-nowrap")},g))});p.displayName="Badge"},28617:function(e,t,r){"use strict";var n=r(2265),i=r(27380),o=r(51646),a=r(6543);t.Z=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],t=(0,n.useRef)({}),r=(0,o.Z)(),s=(0,a.ZP)();return(0,i.Z)(()=>{let n=s.subscribe(n=>{t.current=n,e&&r()});return()=>s.unsubscribe(n)},[]),t.current}},78867:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},33245:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(79205).Z)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},95704:function(e,t,r){"use strict";r.d(t,{Dx:function(){return d.Z},RM:function(){return o.Z},SC:function(){return c.Z},Zb:function(){return n.Z},iA:function(){return i.Z},pj:function(){return a.Z},ss:function(){return s.Z},xs:function(){return u.Z},xv:function(){return l.Z}});var n=r(12514),i=r(21626),o=r(97214),a=r(28241),s=r(58834),u=r(69552),c=r(71876),l=r(84264),d=r(96761)},80443:function(e,t,r){"use strict";var n=r(2265),i=r(99376),o=r(14474),a=r(3914);t.Z=()=>{var e,t,r,s,u,c,l;let d=(0,i.useRouter)(),f="undefined"!=typeof document?(0,a.e)("token"):null;(0,n.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let p=(0,n.useMemo)(()=>{if(!f)return null;try{return(0,o.o)(f)}catch(e){return(0,a.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==p?void 0:p.key)&&void 0!==e?e:null,userId:null!==(t=null==p?void 0:p.user_id)&&void 0!==t?t:null,userEmail:null!==(r=null==p?void 0:p.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(s=null==p?void 0:p.user_role)&&void 0!==s?s:null),premiumUser:null!==(u=null==p?void 0:p.premium_user)&&void 0!==u?u:null,disabledPersonalKeyCreation:null!==(c=null==p?void 0:p.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==p?void 0:p.login_method)==="username_password"}}},30615:function(e,t,r){"use strict";r.r(t);var n=r(57437),i=r(18160),o=r(80443);t.default=()=>{let{accessToken:e,premiumUser:t,userRole:r}=(0,o.Z)();return(0,n.jsx)(i.Z,{accessToken:e,publicPage:!1,premiumUser:t,userRole:r})}},20347:function(e,t,r){"use strict";r.d(t,{LQ:function(){return o},ZL:function(){return n},lo:function(){return i},tY:function(){return a}});let n=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],i=["Internal User","Internal Viewer"],o=["Internal User","Admin","proxy_admin"],a=e=>n.includes(e)},86462:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});t.Z=i},47686:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});t.Z=i},44633:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});t.Z=i},3477:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});t.Z=i},93416:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});t.Z=i},77355:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});t.Z=i},17732:function(e,t,r){"use strict";var n=r(2265);let i=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))});t.Z=i},14474:function(e,t,r){"use strict";r.d(t,{o:function(){return i}});class n extends Error{}function i(e,t){let r;if("string"!=typeof e)throw new n("Invalid token specified: must be a string");t||(t={});let i=!0===t.header?0:1,o=e.split(".")[i];if("string"!=typeof o)throw new n(`Invalid token specified: missing part #${i+1}`);try{r=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 r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(o)}catch(e){throw new n(`Invalid token specified: invalid base64 for part #${i+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new n(`Invalid token specified: invalid json for part #${i+1} (${e.message})`)}}n.prototype.name="InvalidTokenError"}},function(e){e.O(0,[1114,1491,4556,2417,3709,2525,1529,2284,9011,3603,7906,9165,169,8049,2162,8160,2971,2117,1744],function(){return e(e.s=24181)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/models-and-endpoints/page-e6682898ea55d333.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/models-and-endpoints/page-797f6bbb69d5f1fc.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/models-and-endpoints/page-e6682898ea55d333.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/models-and-endpoints/page-797f6bbb69d5f1fc.js index b918feb33d4..2810502ef2b 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/models-and-endpoints/page-e6682898ea55d333.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/models-and-endpoints/page-797f6bbb69d5f1fc.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1664],{18530:function(e,t,r){Promise.resolve().then(r.bind(r,6121))},12660:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(1119),s=r(2265),a={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"},l=r(55015),o=s.forwardRef(function(e,t){return s.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},5540:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(1119),s=r(2265),a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},l=r(55015),o=s.forwardRef(function(e,t){return s.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},3810:function(e,t,r){"use strict";r.d(t,{Z:function(){return k}});var n=r(2265),s=r(49638),a=r(36760),l=r.n(a),o=r(93350),i=r(53445),c=r(6694),d=r(71744),u=r(352),m=r(36360),h=r(12918),p=r(3104),g=r(80669);let f=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:s,calc:a}=e,l=a(n).sub(r).equal(),o=a(t).sub(r).equal();return{[s]:Object.assign(Object.assign({},(0,h.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(s,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(s,"-close-icon")]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(s,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(s,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:l}}),["".concat(s,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},x=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,s=e.fontSizeSM;return(0,p.TS)(e,{tagFontSize:s,tagLineHeight:(0,u.bf)(n(e.lineHeightSM).mul(s).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary})},v=e=>({defaultBg:new m.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var b=(0,g.I$)("Tag",e=>f(x(e)),v),y=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(e);st.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};let _=n.forwardRef((e,t)=>{let{prefixCls:r,style:s,className:a,checked:o,onChange:i,onClick:c}=e,u=y(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:m,tag:h}=n.useContext(d.E_),p=m("tag",r),[g,f,x]=b(p),v=l()(p,"".concat(p,"-checkable"),{["".concat(p,"-checkable-checked")]:o},null==h?void 0:h.className,a,f,x);return g(n.createElement("span",Object.assign({},u,{ref:t,style:Object.assign(Object.assign({},s),null==h?void 0:h.style),className:v,onClick:e=>{null==i||i(!o),null==c||c(e)}})))});var j=r(18536);let S=e=>(0,j.Z)(e,(t,r)=>{let{textColor:n,lightBorderColor:s,lightColor:a,darkColor:l}=r;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:n,background:a,borderColor:s,"&-inverse":{color:e.colorTextLightSolid,background:l,borderColor:l},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var C=(0,g.bk)(["Tag","preset"],e=>S(x(e)),v);let w=(e,t,r)=>{let n="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(r)],background:e["color".concat(n,"Bg")],borderColor:e["color".concat(n,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var A=(0,g.bk)(["Tag","status"],e=>{let t=x(e);return[w(t,"success","Success"),w(t,"processing","Info"),w(t,"error","Error"),w(t,"warning","Warning")]},v),N=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(e);st.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};let I=n.forwardRef((e,t)=>{let{prefixCls:r,className:a,rootClassName:u,style:m,children:h,icon:p,color:g,onClose:f,closeIcon:x,closable:v,bordered:y=!0}=e,_=N(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:j,direction:S,tag:w}=n.useContext(d.E_),[I,k]=n.useState(!0);n.useEffect(()=>{"visible"in _&&k(_.visible)},[_.visible]);let O=(0,o.o2)(g),z=(0,o.yT)(g),Z=O||z,F=Object.assign(Object.assign({backgroundColor:g&&!Z?g:void 0},null==w?void 0:w.style),m),R=j("tag",r),[E,T,M]=b(R),P=l()(R,null==w?void 0:w.className,{["".concat(R,"-").concat(g)]:Z,["".concat(R,"-has-color")]:g&&!Z,["".concat(R,"-hidden")]:!I,["".concat(R,"-rtl")]:"rtl"===S,["".concat(R,"-borderless")]:!y},a,u,T,M),D=e=>{e.stopPropagation(),null==f||f(e),e.defaultPrevented||k(!1)},[,L]=(0,i.Z)(v,x,e=>null===e?n.createElement(s.Z,{className:"".concat(R,"-close-icon"),onClick:D}):n.createElement("span",{className:"".concat(R,"-close-icon"),onClick:D},e),null,!1),V="function"==typeof _.onClick||h&&"a"===h.type,G=p||null,B=G?n.createElement(n.Fragment,null,G,h&&n.createElement("span",null,h)):h,H=n.createElement("span",Object.assign({},_,{ref:t,className:P,style:F}),B,L,O&&n.createElement(C,{key:"preset",prefixCls:R}),z&&n.createElement(A,{key:"status",prefixCls:R}));return E(V?n.createElement(c.Z,{component:"Tag"},H):H)});I.CheckableTag=_;var k=I},40728:function(e,t,r){"use strict";r.d(t,{C:function(){return n.Z},x:function(){return s.Z}});var n=r(41649),s=r(84264)},19130:function(e,t,r){"use strict";r.d(t,{RM:function(){return s.Z},SC:function(){return i.Z},iA:function(){return n.Z},pj:function(){return a.Z},ss:function(){return l.Z},xs:function(){return o.Z}});var n=r(21626),s=r(97214),a=r(28241),l=r(58834),o=r(69552),i=r(71876)},24601:function(){},18975:function(e,t,r){"use strict";var n=r(40257);r(24601);var s=r(2265),a=s&&"object"==typeof s&&"default"in s?s:{default:s},l=void 0!==n&&n.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},i=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,s=t.optimizeForSpeed,a=void 0===s?l:s;c(o(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof a,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=a,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var i="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=i?i.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(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(c(!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||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t>>0},u={};function m(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return u[n]||(u[n]="jsx-"+d(e+"-"+r)),u[n]}function h(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var p=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,s=t.optimizeForSpeed,a=void 0!==s&&s;this._sheet=n||new i({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),n&&"boolean"==typeof a&&(this._sheet.setOptimizeForSpeed(a),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 r=this.getIdAndRules(e),n=r.styleId,s=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var a=s.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=a,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},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]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return a.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var s=m(n,r);return{styleId:s,rules:Array.isArray(t)?t.map(function(e){return h(s,e)}):[h(s,t)]}}return{styleId:m(n),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}(),g=s.createContext(null);g.displayName="StyleSheetContext";var f=a.default.useInsertionEffect||a.default.useLayoutEffect,x="undefined"!=typeof window?new p:void 0;function v(e){var t=x||s.useContext(g);return t&&("undefined"==typeof window?t.add(e):f(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return m(e[0],e[1])}).join(" ")},t.style=v},29:function(e,t,r){"use strict";e.exports=r(18975).style},6121:function(e,t,r){"use strict";r.r(t);var n=r(57437),s=r(39760),a=r(11318),l=r(2265),o=r(81598);t.default=()=>{let{token:e,accessToken:t,userRole:r,userId:i,premiumUser:c}=(0,s.Z)(),[d,u]=(0,l.useState)([]),{teams:m}=(0,a.Z)();return(0,n.jsx)(o.Z,{accessToken:t,token:e,userRole:r,userID:i,modelData:{data:[]},keys:d,setModelData:()=>{},premiumUser:c,teams:m})}},84376:function(e,t,r){"use strict";var n=r(57437);r(2265);var s=r(52787);t.Z=e=>{let{teams:t,value:r,onChange:a,disabled:l}=e;return console.log("disabled",l),(0,n.jsx)(s.default,{showSearch:!0,placeholder:"Search or select a team",value:r,onChange:a,disabled:l,filterOption:(e,r)=>{if(!r)return!1;let n=null==t?void 0:t.find(e=>e.team_id===r.key);if(!n)return!1;let s=e.toLowerCase().trim(),a=(n.team_alias||"").toLowerCase(),l=(n.team_id||"").toLowerCase();return a.includes(s)||l.includes(s)},optionFilterProp:"children",children:null==t?void 0:t.map(e=>(0,n.jsxs)(s.default.Option,{value:e.team_id,children:[(0,n.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,n.jsxs)("span",{className:"text-gray-500",children:["(",e.team_id,")"]})]},e.team_id))})}},33860:function(e,t,r){"use strict";var n=r(57437),s=r(2265),a=r(13634),l=r(82680),o=r(52787),i=r(89970),c=r(73002),d=r(7310),u=r.n(d),m=r(19250);t.Z=e=>{let{isVisible:t,onCancel:r,onSubmit:d,accessToken:h,title:p="Add Team Member",roles:g=[{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:f="user"}=e,[x]=a.Z.useForm(),[v,b]=(0,s.useState)([]),[y,_]=(0,s.useState)(!1),[j,S]=(0,s.useState)("user_email"),C=async(e,t)=>{if(!e){b([]);return}_(!0);try{let r=new URLSearchParams;if(r.append(t,e),null==h)return;let n=(await (0,m.userFilterUICall)(h,r)).map(e=>({label:"user_email"===t?"".concat(e.user_email):"".concat(e.user_id),value:"user_email"===t?e.user_email:e.user_id,user:e}));b(n)}catch(e){console.error("Error fetching users:",e)}finally{_(!1)}},w=(0,s.useCallback)(u()((e,t)=>C(e,t),300),[]),A=(e,t)=>{S(t),w(e,t)},N=(e,t)=>{let r=t.user;x.setFieldsValue({user_email:r.user_email,user_id:r.user_id,role:x.getFieldValue("role")})};return(0,n.jsx)(l.Z,{title:p,open:t,onCancel:()=>{x.resetFields(),b([]),r()},footer:null,width:800,children:(0,n.jsxs)(a.Z,{form:x,onFinish:d,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:f},children:[(0,n.jsx)(a.Z.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,n.jsx)(o.default,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>A(e,"user_email"),onSelect:(e,t)=>N(e,t),options:"user_email"===j?v:[],loading:y,allowClear:!0})}),(0,n.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,n.jsx)(a.Z.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,n.jsx)(o.default,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>A(e,"user_id"),onSelect:(e,t)=>N(e,t),options:"user_id"===j?v:[],loading:y,allowClear:!0})}),(0,n.jsx)(a.Z.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,n.jsx)(o.default,{defaultValue:f,children:g.map(e=>(0,n.jsx)(o.default.Option,{value:e.value,children:(0,n.jsxs)(i.Z,{title:e.description,children:[(0,n.jsx)("span",{className:"font-medium",children:e.label}),(0,n.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,n.jsx)("div",{className:"text-right mt-4",children:(0,n.jsx)(c.ZP,{type:"default",htmlType:"submit",children:"Add Member"})})]})})}},27799:function(e,t,r){"use strict";var n=r(57437);r(2265);var s=r(40728),a=r(82182),l=r(91777),o=r(97434);t.Z=function(e){let{loggingConfigs:t=[],disabledCallbacks:r=[],variant:i="card",className:c=""}=e,d=e=>{var t;return(null===(t=Object.entries(o.Lo).find(t=>{let[r,n]=t;return n===e}))||void 0===t?void 0:t[0])||e},u=e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}},m=e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}},h=(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(a.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,n.jsx)(s.C,{color:"blue",size:"xs",children:t.length})]}),t.length>0?(0,n.jsx)("div",{className:"space-y-3",children:t.map((e,t)=>{var r;let l=d(e.callback_name),i=null===(r=o.Dg[l])||void 0===r?void 0:r.logo;return(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[i?(0,n.jsx)("img",{src:i,alt:l,className:"w-5 h-5 object-contain"}):(0,n.jsx)(a.Z,{className:"h-5 w-5 text-gray-400"}),(0,n.jsxs)("div",{children:[(0,n.jsx)(s.x,{className:"font-medium text-blue-800",children:l}),(0,n.jsxs)(s.x,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,n.jsx)(s.C,{color:u(e.callback_type),size:"sm",children:m(e.callback_type)})]},t)})}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(a.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(s.x,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-red-600"}),(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,n.jsx)(s.C,{color:"red",size:"xs",children:r.length})]}),r.length>0?(0,n.jsx)("div",{className:"space-y-3",children:r.map((e,t)=>{var r;let a=o.RD[e]||e,i=null===(r=o.Dg[a])||void 0===r?void 0:r.logo;return(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[i?(0,n.jsx)("img",{src:i,alt:a,className:"w-5 h-5 object-contain"}):(0,n.jsx)(l.Z,{className:"h-5 w-5 text-gray-400"}),(0,n.jsxs)("div",{children:[(0,n.jsx)(s.x,{className:"font-medium text-red-800",children:a}),(0,n.jsx)(s.x,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,n.jsx)(s.C,{color:"red",size:"sm",children:"Disabled"})]},t)})}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(s.x,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===i?(0,n.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(c),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,n.jsx)(s.x,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),h]}):(0,n.jsxs)("div",{className:"".concat(c),children:[(0,n.jsx)(s.x,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),h]})}},8048:function(e,t,r){"use strict";r.d(t,{C:function(){return u}});var n=r(57437),s=r(71594),a=r(24525),l=r(2265),o=r(19130),i=r(44633),c=r(86462),d=r(49084);function u(e){let{data:t=[],columns:r,isLoading:u=!1,table:m,defaultSorting:h=[]}=e,[p,g]=l.useState(h),[f]=l.useState("onChange"),[x,v]=l.useState({}),[b,y]=l.useState({}),_=(0,s.b7)({data:t,columns:r,state:{sorting:p,columnSizing:x,columnVisibility:b},columnResizeMode:f,onSortingChange:g,onColumnSizingChange:v,onColumnVisibilityChange:y,getCoreRowModel:(0,a.sC)(),getSortedRowModel:(0,a.tj)(),enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return l.useEffect(()=>{m&&(m.current=_)},[_,m]),(0,n.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsx)("div",{className:"relative min-w-full",children:(0,n.jsxs)(o.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,n.jsx)(o.ss,{children:_.getHeaderGroups().map(e=>(0,n.jsx)(o.SC,{children:e.headers.map(e=>{var t;return(0,n.jsxs)(o.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,s.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,n.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,n.jsx)(i.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,n.jsx)(c.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,n.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,n.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,n.jsx)(o.RM,{children:u?(0,n.jsx)(o.SC,{children:(0,n.jsx)(o.pj,{colSpan:r.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):_.getRowModel().rows.length>0?_.getRowModel().rows.map(e=>(0,n.jsx)(o.SC,{children:e.getVisibleCells().map(e=>{var t;return(0,n.jsx)(o.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,s.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,n.jsx)(o.SC,{children:(0,n.jsx)(o.pj,{colSpan:r.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"No models found"})})})})})]})})})})}},98015:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(57437),s=r(2265),a=r(92280),l=r(40728),o=r(79814),i=r(19250),c=function(e){let{vectorStores:t,accessToken:r}=e,[a,c]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(r&&0!==t.length)try{let e=await (0,i.vectorStoreListCall)(r);e.data&&c(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[r,t.length]);let d=e=>{let t=a.find(t=>t.vector_store_id===e);return t?"".concat(t.vector_store_name||t.vector_store_id," (").concat(t.vector_store_id,")"):e};return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(o.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(l.x,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,n.jsx)(l.C,{color:"blue",size:"xs",children:t.length})]}),t.length>0?(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((e,t)=>(0,n.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:d(e)},t))}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(o.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(l.x,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},d=r(25327),u=r(86462),m=r(47686),h=r(89970),p=function(e){let{mcpServers:t,mcpAccessGroups:a=[],mcpToolPermissions:o={},accessToken:c}=e,[p,g]=(0,s.useState)([]),[f,x]=(0,s.useState)([]),[v,b]=(0,s.useState)(new Set),y=e=>{b(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})};(0,s.useEffect)(()=>{(async()=>{if(c&&t.length>0)try{let e=await (0,i.fetchMCPServers)(c);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[c,t.length]),(0,s.useEffect)(()=>{(async()=>{if(c&&a.length>0)try{let e=await Promise.resolve().then(r.bind(r,19250)).then(e=>e.fetchMCPAccessGroups(c));x(Array.isArray(e)?e:e.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[c,a.length]);let _=e=>{let t=p.find(t=>t.server_id===e);if(t){let r=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(t.alias," (").concat(r,")")}return e},j=e=>e,S=[...t.map(e=>({type:"server",value:e})),...a.map(e=>({type:"accessGroup",value:e}))],C=S.length;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(d.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(l.x,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,n.jsx)(l.C,{color:"blue",size:"xs",children:C})]}),C>0?(0,n.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:S.map((e,t)=>{let r="server"===e.type?o[e.value]:void 0,s=r&&r.length>0,a=v.has(e.value);return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{onClick:()=>s&&y(e.value),className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ".concat(s?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,n.jsx)(h.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,n.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:_(e.value)})]})}):(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,n.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:j(e.value)}),(0,n.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),s&&(0,n.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,n.jsx)("span",{className:"text-xs font-medium text-gray-600",children:r.length}),(0,n.jsx)("span",{className:"text-xs text-gray-500",children:1===r.length?"tool":"tools"}),a?(0,n.jsx)(u.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,n.jsx)(m.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),s&&a&&(0,n.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:r.map((e,t)=>(0,n.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},t))})})]},t)})}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(l.x,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},g=function(e){let{objectPermission:t,variant:r="card",className:s="",accessToken:l}=e,o=(null==t?void 0:t.vector_stores)||[],i=(null==t?void 0:t.mcp_servers)||[],d=(null==t?void 0:t.mcp_access_groups)||[],u=(null==t?void 0:t.mcp_tool_permissions)||{},m=(0,n.jsxs)("div",{className:"card"===r?"grid grid-cols-1 md:grid-cols-2 gap-6":"space-y-4",children:[(0,n.jsx)(c,{vectorStores:o,accessToken:l}),(0,n.jsx)(p,{mcpServers:i,mcpAccessGroups:d,mcpToolPermissions:u,accessToken:l})]});return"card"===r?(0,n.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(s),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(a.x,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,n.jsx)(a.x,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),m]}):(0,n.jsxs)("div",{className:"".concat(s),children:[(0,n.jsx)(a.x,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),m]})}},42673:function(e,t,r){"use strict";var n,s;r.d(t,{Cl:function(){return n},bK:function(){return d},cd:function(){return o},dr:function(){return i},fK:function(){return a},ph:function(){return c}}),(s=n||(n={})).AIML="AI/ML API",s.Bedrock="Amazon Bedrock",s.Anthropic="Anthropic",s.AssemblyAI="AssemblyAI",s.SageMaker="AWS SageMaker",s.Azure="Azure",s.Azure_AI_Studio="Azure AI Foundry (Studio)",s.Cerebras="Cerebras",s.Cohere="Cohere",s.Dashscope="Dashscope",s.Databricks="Databricks (Qwen API)",s.DeepInfra="DeepInfra",s.Deepgram="Deepgram",s.Deepseek="Deepseek",s.ElevenLabs="ElevenLabs",s.FalAI="Fal AI",s.FireworksAI="Fireworks AI",s.Google_AI_Studio="Google AI Studio",s.GradientAI="GradientAI",s.Groq="Groq",s.Hosted_Vllm="vllm",s.Infinity="Infinity",s.JinaAI="Jina AI",s.MistralAI="Mistral AI",s.Ollama="Ollama",s.OpenAI="OpenAI",s.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",s.OpenAI_Text="OpenAI Text Completion",s.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",s.Openrouter="Openrouter",s.Oracle="Oracle Cloud Infrastructure (OCI)",s.Perplexity="Perplexity",s.Sambanova="Sambanova",s.Snowflake="Snowflake",s.TogetherAI="TogetherAI",s.Triton="Triton",s.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",s.VolcEngine="VolcEngine",s.Voyage="Voyage AI",s.xAI="xAI";let a={AIML:"aiml",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",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity"},l="/ui/assets/logos/",o={"AI/ML API":"".concat(l,"aiml_api.svg"),Anthropic:"".concat(l,"anthropic.svg"),AssemblyAI:"".concat(l,"assemblyai_small.png"),Azure:"".concat(l,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(l,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(l,"bedrock.svg"),"AWS SageMaker":"".concat(l,"bedrock.svg"),Cerebras:"".concat(l,"cerebras.svg"),Cohere:"".concat(l,"cohere.svg"),"Databricks (Qwen API)":"".concat(l,"databricks.svg"),Dashscope:"".concat(l,"dashscope.svg"),Deepseek:"".concat(l,"deepseek.svg"),"Fireworks AI":"".concat(l,"fireworks.svg"),Groq:"".concat(l,"groq.svg"),"Google AI Studio":"".concat(l,"google.svg"),vllm:"".concat(l,"vllm.png"),Infinity:"".concat(l,"infinity.png"),"Mistral AI":"".concat(l,"mistral.svg"),Ollama:"".concat(l,"ollama.svg"),OpenAI:"".concat(l,"openai_small.svg"),"OpenAI Text Completion":"".concat(l,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(l,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(l,"openai_small.svg"),Openrouter:"".concat(l,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(l,"oracle.svg"),Perplexity:"".concat(l,"perplexity-ai.svg"),Sambanova:"".concat(l,"sambanova.svg"),Snowflake:"".concat(l,"snowflake.svg"),TogetherAI:"".concat(l,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(l,"google.svg"),xAI:"".concat(l,"xai.svg"),GradientAI:"".concat(l,"gradientai.svg"),Triton:"".concat(l,"nvidia_triton.png"),Deepgram:"".concat(l,"deepgram.png"),ElevenLabs:"".concat(l,"elevenlabs.png"),"Fal AI":"".concat(l,"fal_ai.jpg"),"Voyage AI":"".concat(l,"voyage.webp"),"Jina AI":"".concat(l,"jina.png"),VolcEngine:"".concat(l,"volcengine.png"),DeepInfra:"".concat(l,"deepinfra.png")},i=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:o[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let r=n[t];return{logo:o[r],displayName:r}},c=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"azure/my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else return"gpt-3.5-turbo"},d=(e,t)=>{console.log("Provider key: ".concat(e));let r=a[e];console.log("Provider mapped to: ".concat(r));let n=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(e=>{let[t,s]=e;null!==s&&"object"==typeof s&&"litellm_provider"in s&&(s.litellm_provider===r||s.litellm_provider.includes(r))&&n.push(t)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(e=>{let[t,r]=e;null!==r&&"object"==typeof r&&"litellm_provider"in r&&"cohere_chat"===r.litellm_provider&&n.push(t)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(e=>{let[t,r]=e;null!==r&&"object"==typeof r&&"litellm_provider"in r&&"sagemaker_chat"===r.litellm_provider&&n.push(t)}))),n}},21425:function(e,t,r){"use strict";var n=r(57437);r(2265);var s=r(54507);t.Z=e=>{let{value:t,onChange:r,disabledCallbacks:a=[],onDisabledCallbacksChange:l}=e;return(0,n.jsx)(s.Z,{value:t,onChange:r,disabledCallbacks:a,onDisabledCallbacksChange:l})}},10901:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(57437),s=r(2265),a=r(13634),l=r(82680),o=r(73002),i=r(27281),c=r(57365),d=r(49566),u=r(92280),m=r(24199),h=e=>{var t,r,h;let{visible:p,onCancel:g,onSubmit:f,initialData:x,mode:v,config:b}=e,[y]=a.Z.useForm();console.log("Initial Data:",x),(0,s.useEffect)(()=>{if(p){if("edit"===v&&x){let e={...x,role:x.role||b.defaultRole,max_budget_in_team:x.max_budget_in_team||null,tpm_limit:x.tpm_limit||null,rpm_limit:x.rpm_limit||null};console.log("Setting form values:",e),y.setFieldsValue(e)}else{var e;y.resetFields(),y.setFieldsValue({role:b.defaultRole||(null===(e=b.roleOptions[0])||void 0===e?void 0:e.value)})}}},[p,x,v,y,b.defaultRole,b.roleOptions]);let _=async e=>{try{let t=Object.entries(e).reduce((e,t)=>{let[r,n]=t;if("string"==typeof n){let t=n.trim();return""===t&&("max_budget_in_team"===r||"tpm_limit"===r||"rpm_limit"===r)?{...e,[r]:null}:{...e,[r]:t}}return{...e,[r]:n}},{});console.log("Submitting form data:",t),f(t),y.resetFields()}catch(e){console.error("Form submission error:",e)}},j=e=>{switch(e.type){case"input":return(0,n.jsx)(d.Z,{placeholder:e.placeholder});case"numerical":return(0,n.jsx)(m.Z,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":var t;return(0,n.jsx)(i.Z,{children:null===(t=e.options)||void 0===t?void 0:t.map(e=>(0,n.jsx)(c.Z,{value:e.value,children:e.label},e.value))});default:return null}};return(0,n.jsx)(l.Z,{title:b.title||("add"===v?"Add Member":"Edit Member"),open:p,width:1e3,footer:null,onCancel:g,children:(0,n.jsxs)(a.Z,{form:y,onFinish:_,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[b.showEmail&&(0,n.jsx)(a.Z.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,n.jsx)(d.Z,{placeholder:"user@example.com"})}),b.showEmail&&b.showUserId&&(0,n.jsx)("div",{className:"text-center mb-4",children:(0,n.jsx)(u.x,{children:"OR"})}),b.showUserId&&(0,n.jsx)(a.Z.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,n.jsx)(d.Z,{placeholder:"user_123"})}),(0,n.jsx)(a.Z.Item,{label:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{children:"Role"}),"edit"===v&&x&&(0,n.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(r=x.role,(null===(h=b.roleOptions.find(e=>e.value===r))||void 0===h?void 0:h.label)||r),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,n.jsx)(i.Z,{children:"edit"===v&&x?[...b.roleOptions.filter(e=>e.value===x.role),...b.roleOptions.filter(e=>e.value!==x.role)].map(e=>(0,n.jsx)(c.Z,{value:e.value,children:e.label},e.value)):b.roleOptions.map(e=>(0,n.jsx)(c.Z,{value:e.value,children:e.label},e.value))})}),null===(t=b.additionalFields)||void 0===t?void 0:t.map(e=>(0,n.jsx)(a.Z.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:j(e)},e.name)),(0,n.jsxs)("div",{className:"text-right mt-6",children:[(0,n.jsx)(o.ZP,{onClick:g,className:"mr-2",children:"Cancel"}),(0,n.jsx)(o.ZP,{type:"default",htmlType:"submit",children:"add"===v?"Add Member":"Save Changes"})]})]})})}},33304:function(e,t,r){"use strict";function n(e){return""===e?null:e}r.d(t,{C:function(){return n}})},49084:function(e,t,r){"use strict";var n=r(2265);let s=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=s}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,2344,352,1487,7732,4851,8448,8049,131,2012,1598,2971,2117,1744],function(){return e(e.s=18530)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1664],{18530:function(e,t,r){Promise.resolve().then(r.bind(r,6121))},12660:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(1119),s=r(2265),a={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"},l=r(55015),o=s.forwardRef(function(e,t){return s.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},5540:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(1119),s=r(2265),a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},l=r(55015),o=s.forwardRef(function(e,t){return s.createElement(l.Z,(0,n.Z)({},e,{ref:t,icon:a}))})},3810:function(e,t,r){"use strict";r.d(t,{Z:function(){return k}});var n=r(2265),s=r(49638),a=r(36760),l=r.n(a),o=r(93350),i=r(53445),c=r(6694),d=r(71744),u=r(352),m=r(36360),h=r(12918),p=r(3104),g=r(80669);let f=e=>{let{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:s,calc:a}=e,l=a(n).sub(r).equal(),o=a(t).sub(r).equal();return{[s]:Object.assign(Object.assign({},(0,h.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:"".concat((0,u.bf)(e.lineWidth)," ").concat(e.lineType," ").concat(e.colorBorder),borderRadius:e.borderRadiusSM,opacity:1,transition:"all ".concat(e.motionDurationMid),textAlign:"start",position:"relative",["&".concat(s,"-rtl")]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},["".concat(s,"-close-icon")]:{marginInlineStart:o,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:"all ".concat(e.motionDurationMid),"&:hover":{color:e.colorTextHeading}},["&".concat(s,"-has-color")]:{borderColor:"transparent",["&, a, a:hover, ".concat(e.iconCls,"-close, ").concat(e.iconCls,"-close:hover")]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",["&:not(".concat(s,"-checkable-checked):hover")]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},["> ".concat(e.iconCls," + span, > span + ").concat(e.iconCls)]:{marginInlineStart:l}}),["".concat(s,"-borderless")]:{borderColor:"transparent",background:e.tagBorderlessBg}}},x=e=>{let{lineWidth:t,fontSizeIcon:r,calc:n}=e,s=e.fontSizeSM;return(0,p.TS)(e,{tagFontSize:s,tagLineHeight:(0,u.bf)(n(e.lineHeightSM).mul(s).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary})},v=e=>({defaultBg:new m.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var b=(0,g.I$)("Tag",e=>f(x(e)),v),y=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(e);st.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};let _=n.forwardRef((e,t)=>{let{prefixCls:r,style:s,className:a,checked:o,onChange:i,onClick:c}=e,u=y(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:m,tag:h}=n.useContext(d.E_),p=m("tag",r),[g,f,x]=b(p),v=l()(p,"".concat(p,"-checkable"),{["".concat(p,"-checkable-checked")]:o},null==h?void 0:h.className,a,f,x);return g(n.createElement("span",Object.assign({},u,{ref:t,style:Object.assign(Object.assign({},s),null==h?void 0:h.style),className:v,onClick:e=>{null==i||i(!o),null==c||c(e)}})))});var j=r(18536);let S=e=>(0,j.Z)(e,(t,r)=>{let{textColor:n,lightBorderColor:s,lightColor:a,darkColor:l}=r;return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:n,background:a,borderColor:s,"&-inverse":{color:e.colorTextLightSolid,background:l,borderColor:l},["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}});var C=(0,g.bk)(["Tag","preset"],e=>S(x(e)),v);let w=(e,t,r)=>{let n="string"!=typeof r?r:r.charAt(0).toUpperCase()+r.slice(1);return{["".concat(e.componentCls).concat(e.componentCls,"-").concat(t)]:{color:e["color".concat(r)],background:e["color".concat(n,"Bg")],borderColor:e["color".concat(n,"Border")],["&".concat(e.componentCls,"-borderless")]:{borderColor:"transparent"}}}};var A=(0,g.bk)(["Tag","status"],e=>{let t=x(e);return[w(t,"success","Success"),w(t,"processing","Info"),w(t,"error","Error"),w(t,"warning","Warning")]},v),N=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(e);st.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r};let I=n.forwardRef((e,t)=>{let{prefixCls:r,className:a,rootClassName:u,style:m,children:h,icon:p,color:g,onClose:f,closeIcon:x,closable:v,bordered:y=!0}=e,_=N(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:j,direction:S,tag:w}=n.useContext(d.E_),[I,k]=n.useState(!0);n.useEffect(()=>{"visible"in _&&k(_.visible)},[_.visible]);let O=(0,o.o2)(g),z=(0,o.yT)(g),Z=O||z,F=Object.assign(Object.assign({backgroundColor:g&&!Z?g:void 0},null==w?void 0:w.style),m),R=j("tag",r),[E,T,M]=b(R),P=l()(R,null==w?void 0:w.className,{["".concat(R,"-").concat(g)]:Z,["".concat(R,"-has-color")]:g&&!Z,["".concat(R,"-hidden")]:!I,["".concat(R,"-rtl")]:"rtl"===S,["".concat(R,"-borderless")]:!y},a,u,T,M),D=e=>{e.stopPropagation(),null==f||f(e),e.defaultPrevented||k(!1)},[,L]=(0,i.Z)(v,x,e=>null===e?n.createElement(s.Z,{className:"".concat(R,"-close-icon"),onClick:D}):n.createElement("span",{className:"".concat(R,"-close-icon"),onClick:D},e),null,!1),V="function"==typeof _.onClick||h&&"a"===h.type,G=p||null,B=G?n.createElement(n.Fragment,null,G,h&&n.createElement("span",null,h)):h,H=n.createElement("span",Object.assign({},_,{ref:t,className:P,style:F}),B,L,O&&n.createElement(C,{key:"preset",prefixCls:R}),z&&n.createElement(A,{key:"status",prefixCls:R}));return E(V?n.createElement(c.Z,{component:"Tag"},H):H)});I.CheckableTag=_;var k=I},40728:function(e,t,r){"use strict";r.d(t,{C:function(){return n.Z},x:function(){return s.Z}});var n=r(41649),s=r(84264)},19130:function(e,t,r){"use strict";r.d(t,{RM:function(){return s.Z},SC:function(){return i.Z},iA:function(){return n.Z},pj:function(){return a.Z},ss:function(){return l.Z},xs:function(){return o.Z}});var n=r(21626),s=r(97214),a=r(28241),l=r(58834),o=r(69552),i=r(71876)},24601:function(){},18975:function(e,t,r){"use strict";var n=r(40257);r(24601);var s=r(2265),a=s&&"object"==typeof s&&"default"in s?s:{default:s},l=void 0!==n&&n.env&&!0,o=function(e){return"[object String]"===Object.prototype.toString.call(e)},i=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,s=t.optimizeForSpeed,a=void 0===s?l:s;c(o(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof a,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=a,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var i="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=i?i.getAttribute("content"):null}var t=e.prototype;return t.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(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(c(!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||(l||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},t.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t>>0},u={};function m(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return u[n]||(u[n]="jsx-"+d(e+"-"+r)),u[n]}function h(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var p=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,s=t.optimizeForSpeed,a=void 0!==s&&s;this._sheet=n||new i({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),n&&"boolean"==typeof a&&(this._sheet.setOptimizeForSpeed(a),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 r=this.getIdAndRules(e),n=r.styleId,s=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var a=s.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=a,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},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]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return a.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var s=m(n,r);return{styleId:s,rules:Array.isArray(t)?t.map(function(e){return h(s,e)}):[h(s,t)]}}return{styleId:m(n),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}(),g=s.createContext(null);g.displayName="StyleSheetContext";var f=a.default.useInsertionEffect||a.default.useLayoutEffect,x="undefined"!=typeof window?new p:void 0;function v(e){var t=x||s.useContext(g);return t&&("undefined"==typeof window?t.add(e):f(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return m(e[0],e[1])}).join(" ")},t.style=v},29:function(e,t,r){"use strict";e.exports=r(18975).style},6121:function(e,t,r){"use strict";r.r(t);var n=r(57437),s=r(80443),a=r(11318),l=r(2265),o=r(81598);t.default=()=>{let{token:e,accessToken:t,userRole:r,userId:i,premiumUser:c}=(0,s.Z)(),[d,u]=(0,l.useState)([]),{teams:m}=(0,a.Z)();return(0,n.jsx)(o.Z,{accessToken:t,token:e,userRole:r,userID:i,modelData:{data:[]},keys:d,setModelData:()=>{},premiumUser:c,teams:m})}},84376:function(e,t,r){"use strict";var n=r(57437);r(2265);var s=r(52787);t.Z=e=>{let{teams:t,value:r,onChange:a,disabled:l}=e;return console.log("disabled",l),(0,n.jsx)(s.default,{showSearch:!0,placeholder:"Search or select a team",value:r,onChange:a,disabled:l,filterOption:(e,r)=>{if(!r)return!1;let n=null==t?void 0:t.find(e=>e.team_id===r.key);if(!n)return!1;let s=e.toLowerCase().trim(),a=(n.team_alias||"").toLowerCase(),l=(n.team_id||"").toLowerCase();return a.includes(s)||l.includes(s)},optionFilterProp:"children",children:null==t?void 0:t.map(e=>(0,n.jsxs)(s.default.Option,{value:e.team_id,children:[(0,n.jsx)("span",{className:"font-medium",children:e.team_alias})," ",(0,n.jsxs)("span",{className:"text-gray-500",children:["(",e.team_id,")"]})]},e.team_id))})}},33860:function(e,t,r){"use strict";var n=r(57437),s=r(2265),a=r(13634),l=r(82680),o=r(52787),i=r(89970),c=r(73002),d=r(7310),u=r.n(d),m=r(19250);t.Z=e=>{let{isVisible:t,onCancel:r,onSubmit:d,accessToken:h,title:p="Add Team Member",roles:g=[{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:f="user"}=e,[x]=a.Z.useForm(),[v,b]=(0,s.useState)([]),[y,_]=(0,s.useState)(!1),[j,S]=(0,s.useState)("user_email"),C=async(e,t)=>{if(!e){b([]);return}_(!0);try{let r=new URLSearchParams;if(r.append(t,e),null==h)return;let n=(await (0,m.userFilterUICall)(h,r)).map(e=>({label:"user_email"===t?"".concat(e.user_email):"".concat(e.user_id),value:"user_email"===t?e.user_email:e.user_id,user:e}));b(n)}catch(e){console.error("Error fetching users:",e)}finally{_(!1)}},w=(0,s.useCallback)(u()((e,t)=>C(e,t),300),[]),A=(e,t)=>{S(t),w(e,t)},N=(e,t)=>{let r=t.user;x.setFieldsValue({user_email:r.user_email,user_id:r.user_id,role:x.getFieldValue("role")})};return(0,n.jsx)(l.Z,{title:p,open:t,onCancel:()=>{x.resetFields(),b([]),r()},footer:null,width:800,children:(0,n.jsxs)(a.Z,{form:x,onFinish:d,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:f},children:[(0,n.jsx)(a.Z.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,n.jsx)(o.default,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>A(e,"user_email"),onSelect:(e,t)=>N(e,t),options:"user_email"===j?v:[],loading:y,allowClear:!0})}),(0,n.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,n.jsx)(a.Z.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,n.jsx)(o.default,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>A(e,"user_id"),onSelect:(e,t)=>N(e,t),options:"user_id"===j?v:[],loading:y,allowClear:!0})}),(0,n.jsx)(a.Z.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,n.jsx)(o.default,{defaultValue:f,children:g.map(e=>(0,n.jsx)(o.default.Option,{value:e.value,children:(0,n.jsxs)(i.Z,{title:e.description,children:[(0,n.jsx)("span",{className:"font-medium",children:e.label}),(0,n.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,n.jsx)("div",{className:"text-right mt-4",children:(0,n.jsx)(c.ZP,{type:"default",htmlType:"submit",children:"Add Member"})})]})})}},27799:function(e,t,r){"use strict";var n=r(57437);r(2265);var s=r(40728),a=r(82182),l=r(91777),o=r(97434);t.Z=function(e){let{loggingConfigs:t=[],disabledCallbacks:r=[],variant:i="card",className:c=""}=e,d=e=>{var t;return(null===(t=Object.entries(o.Lo).find(t=>{let[r,n]=t;return n===e}))||void 0===t?void 0:t[0])||e},u=e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}},m=e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}},h=(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(a.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,n.jsx)(s.C,{color:"blue",size:"xs",children:t.length})]}),t.length>0?(0,n.jsx)("div",{className:"space-y-3",children:t.map((e,t)=>{var r;let l=d(e.callback_name),i=null===(r=o.Dg[l])||void 0===r?void 0:r.logo;return(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[i?(0,n.jsx)("img",{src:i,alt:l,className:"w-5 h-5 object-contain"}):(0,n.jsx)(a.Z,{className:"h-5 w-5 text-gray-400"}),(0,n.jsxs)("div",{children:[(0,n.jsx)(s.x,{className:"font-medium text-blue-800",children:l}),(0,n.jsxs)(s.x,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,n.jsx)(s.C,{color:u(e.callback_type),size:"sm",children:m(e.callback_type)})]},t)})}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(a.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(s.x,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-red-600"}),(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,n.jsx)(s.C,{color:"red",size:"xs",children:r.length})]}),r.length>0?(0,n.jsx)("div",{className:"space-y-3",children:r.map((e,t)=>{var r;let a=o.RD[e]||e,i=null===(r=o.Dg[a])||void 0===r?void 0:r.logo;return(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[i?(0,n.jsx)("img",{src:i,alt:a,className:"w-5 h-5 object-contain"}):(0,n.jsx)(l.Z,{className:"h-5 w-5 text-gray-400"}),(0,n.jsxs)("div",{children:[(0,n.jsx)(s.x,{className:"font-medium text-red-800",children:a}),(0,n.jsx)(s.x,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,n.jsx)(s.C,{color:"red",size:"sm",children:"Disabled"})]},t)})}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(s.x,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===i?(0,n.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(c),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,n.jsx)(s.x,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),h]}):(0,n.jsxs)("div",{className:"".concat(c),children:[(0,n.jsx)(s.x,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),h]})}},8048:function(e,t,r){"use strict";r.d(t,{C:function(){return u}});var n=r(57437),s=r(71594),a=r(24525),l=r(2265),o=r(19130),i=r(44633),c=r(86462),d=r(49084);function u(e){let{data:t=[],columns:r,isLoading:u=!1,table:m,defaultSorting:h=[]}=e,[p,g]=l.useState(h),[f]=l.useState("onChange"),[x,v]=l.useState({}),[b,y]=l.useState({}),_=(0,s.b7)({data:t,columns:r,state:{sorting:p,columnSizing:x,columnVisibility:b},columnResizeMode:f,onSortingChange:g,onColumnSizingChange:v,onColumnVisibilityChange:y,getCoreRowModel:(0,a.sC)(),getSortedRowModel:(0,a.tj)(),enableSorting:!0,enableColumnResizing:!0,defaultColumn:{minSize:40,maxSize:500}});return l.useEffect(()=>{m&&(m.current=_)},[_,m]),(0,n.jsx)("div",{className:"rounded-lg custom-border relative",children:(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsx)("div",{className:"relative min-w-full",children:(0,n.jsxs)(o.iA,{className:"[&_td]:py-2 [&_th]:py-2 w-full",children:[(0,n.jsx)(o.ss,{children:_.getHeaderGroups().map(e=>(0,n.jsx)(o.SC,{children:e.headers.map(e=>{var t;return(0,n.jsxs)(o.xs,{className:"py-1 h-8 relative ".concat("actions"===e.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.id?120:e.getSize(),position:"actions"===e.id?"sticky":"relative",right:"actions"===e.id?0:"auto"},onClick:e.column.getCanSort()?e.column.getToggleSortingHandler():void 0,children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("div",{className:"flex items-center",children:e.isPlaceholder?null:(0,s.ie)(e.column.columnDef.header,e.getContext())}),"actions"!==e.id&&e.column.getCanSort()&&(0,n.jsx)("div",{className:"w-4",children:e.column.getIsSorted()?({asc:(0,n.jsx)(i.Z,{className:"h-4 w-4 text-blue-500"}),desc:(0,n.jsx)(c.Z,{className:"h-4 w-4 text-blue-500"})})[e.column.getIsSorted()]:(0,n.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"})})]}),e.column.getCanResize()&&(0,n.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),className:"absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ".concat(e.column.getIsResizing()?"bg-blue-500":"hover:bg-blue-200")})]},e.id)})},e.id))}),(0,n.jsx)(o.RM,{children:u?(0,n.jsx)(o.SC,{children:(0,n.jsx)(o.pj,{colSpan:r.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"\uD83D\uDE85 Loading models..."})})})}):_.getRowModel().rows.length>0?_.getRowModel().rows.map(e=>(0,n.jsx)(o.SC,{children:e.getVisibleCells().map(e=>{var t;return(0,n.jsx)(o.pj,{className:"py-0.5 ".concat("actions"===e.column.id?"sticky right-0 bg-white shadow-[-4px_0_8px_-6px_rgba(0,0,0,0.1)] z-20 w-[120px] ml-8":""," ").concat((null===(t=e.column.columnDef.meta)||void 0===t?void 0:t.className)||""),style:{width:"actions"===e.column.id?120:e.column.getSize(),position:"actions"===e.column.id?"sticky":"relative",right:"actions"===e.column.id?0:"auto"},children:(0,s.ie)(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)):(0,n.jsx)(o.SC,{children:(0,n.jsx)(o.pj,{colSpan:r.length,className:"h-8 text-center",children:(0,n.jsx)("div",{className:"text-center text-gray-500",children:(0,n.jsx)("p",{children:"No models found"})})})})})]})})})})}},98015:function(e,t,r){"use strict";r.d(t,{Z:function(){return g}});var n=r(57437),s=r(2265),a=r(92280),l=r(40728),o=r(79814),i=r(19250),c=function(e){let{vectorStores:t,accessToken:r}=e,[a,c]=(0,s.useState)([]);(0,s.useEffect)(()=>{(async()=>{if(r&&0!==t.length)try{let e=await (0,i.vectorStoreListCall)(r);e.data&&c(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[r,t.length]);let d=e=>{let t=a.find(t=>t.vector_store_id===e);return t?"".concat(t.vector_store_name||t.vector_store_id," (").concat(t.vector_store_id,")"):e};return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(o.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(l.x,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,n.jsx)(l.C,{color:"blue",size:"xs",children:t.length})]}),t.length>0?(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map((e,t)=>(0,n.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:d(e)},t))}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(o.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(l.x,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},d=r(25327),u=r(86462),m=r(47686),h=r(89970),p=function(e){let{mcpServers:t,mcpAccessGroups:a=[],mcpToolPermissions:o={},accessToken:c}=e,[p,g]=(0,s.useState)([]),[f,x]=(0,s.useState)([]),[v,b]=(0,s.useState)(new Set),y=e=>{b(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})};(0,s.useEffect)(()=>{(async()=>{if(c&&t.length>0)try{let e=await (0,i.fetchMCPServers)(c);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[c,t.length]),(0,s.useEffect)(()=>{(async()=>{if(c&&a.length>0)try{let e=await Promise.resolve().then(r.bind(r,19250)).then(e=>e.fetchMCPAccessGroups(c));x(Array.isArray(e)?e:e.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[c,a.length]);let _=e=>{let t=p.find(t=>t.server_id===e);if(t){let r=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(t.alias," (").concat(r,")")}return e},j=e=>e,S=[...t.map(e=>({type:"server",value:e})),...a.map(e=>({type:"accessGroup",value:e}))],C=S.length;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(d.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(l.x,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,n.jsx)(l.C,{color:"blue",size:"xs",children:C})]}),C>0?(0,n.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:S.map((e,t)=>{let r="server"===e.type?o[e.value]:void 0,s=r&&r.length>0,a=v.has(e.value);return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{onClick:()=>s&&y(e.value),className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ".concat(s?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,n.jsx)(h.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,n.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:_(e.value)})]})}):(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,n.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:j(e.value)}),(0,n.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),s&&(0,n.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,n.jsx)("span",{className:"text-xs font-medium text-gray-600",children:r.length}),(0,n.jsx)("span",{className:"text-xs text-gray-500",children:1===r.length?"tool":"tools"}),a?(0,n.jsx)(u.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,n.jsx)(m.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),s&&a&&(0,n.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:r.map((e,t)=>(0,n.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},t))})})]},t)})}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(l.x,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},g=function(e){let{objectPermission:t,variant:r="card",className:s="",accessToken:l}=e,o=(null==t?void 0:t.vector_stores)||[],i=(null==t?void 0:t.mcp_servers)||[],d=(null==t?void 0:t.mcp_access_groups)||[],u=(null==t?void 0:t.mcp_tool_permissions)||{},m=(0,n.jsxs)("div",{className:"card"===r?"grid grid-cols-1 md:grid-cols-2 gap-6":"space-y-4",children:[(0,n.jsx)(c,{vectorStores:o,accessToken:l}),(0,n.jsx)(p,{mcpServers:i,mcpAccessGroups:d,mcpToolPermissions:u,accessToken:l})]});return"card"===r?(0,n.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(s),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(a.x,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,n.jsx)(a.x,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),m]}):(0,n.jsxs)("div",{className:"".concat(s),children:[(0,n.jsx)(a.x,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),m]})}},42673:function(e,t,r){"use strict";var n,s;r.d(t,{Cl:function(){return n},bK:function(){return d},cd:function(){return o},dr:function(){return i},fK:function(){return a},ph:function(){return c}}),(s=n||(n={})).AIML="AI/ML API",s.Bedrock="Amazon Bedrock",s.Anthropic="Anthropic",s.AssemblyAI="AssemblyAI",s.SageMaker="AWS SageMaker",s.Azure="Azure",s.Azure_AI_Studio="Azure AI Foundry (Studio)",s.Cerebras="Cerebras",s.Cohere="Cohere",s.Dashscope="Dashscope",s.Databricks="Databricks (Qwen API)",s.DeepInfra="DeepInfra",s.Deepgram="Deepgram",s.Deepseek="Deepseek",s.ElevenLabs="ElevenLabs",s.FalAI="Fal AI",s.FireworksAI="Fireworks AI",s.Google_AI_Studio="Google AI Studio",s.GradientAI="GradientAI",s.Groq="Groq",s.Hosted_Vllm="vllm",s.Infinity="Infinity",s.JinaAI="Jina AI",s.MistralAI="Mistral AI",s.Ollama="Ollama",s.OpenAI="OpenAI",s.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",s.OpenAI_Text="OpenAI Text Completion",s.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",s.Openrouter="Openrouter",s.Oracle="Oracle Cloud Infrastructure (OCI)",s.Perplexity="Perplexity",s.Sambanova="Sambanova",s.Snowflake="Snowflake",s.TogetherAI="TogetherAI",s.Triton="Triton",s.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",s.VolcEngine="VolcEngine",s.Voyage="Voyage AI",s.xAI="xAI";let a={AIML:"aiml",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",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity"},l="/ui/assets/logos/",o={"AI/ML API":"".concat(l,"aiml_api.svg"),Anthropic:"".concat(l,"anthropic.svg"),AssemblyAI:"".concat(l,"assemblyai_small.png"),Azure:"".concat(l,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(l,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(l,"bedrock.svg"),"AWS SageMaker":"".concat(l,"bedrock.svg"),Cerebras:"".concat(l,"cerebras.svg"),Cohere:"".concat(l,"cohere.svg"),"Databricks (Qwen API)":"".concat(l,"databricks.svg"),Dashscope:"".concat(l,"dashscope.svg"),Deepseek:"".concat(l,"deepseek.svg"),"Fireworks AI":"".concat(l,"fireworks.svg"),Groq:"".concat(l,"groq.svg"),"Google AI Studio":"".concat(l,"google.svg"),vllm:"".concat(l,"vllm.png"),Infinity:"".concat(l,"infinity.png"),"Mistral AI":"".concat(l,"mistral.svg"),Ollama:"".concat(l,"ollama.svg"),OpenAI:"".concat(l,"openai_small.svg"),"OpenAI Text Completion":"".concat(l,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(l,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(l,"openai_small.svg"),Openrouter:"".concat(l,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(l,"oracle.svg"),Perplexity:"".concat(l,"perplexity-ai.svg"),Sambanova:"".concat(l,"sambanova.svg"),Snowflake:"".concat(l,"snowflake.svg"),TogetherAI:"".concat(l,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(l,"google.svg"),xAI:"".concat(l,"xai.svg"),GradientAI:"".concat(l,"gradientai.svg"),Triton:"".concat(l,"nvidia_triton.png"),Deepgram:"".concat(l,"deepgram.png"),ElevenLabs:"".concat(l,"elevenlabs.png"),"Fal AI":"".concat(l,"fal_ai.jpg"),"Voyage AI":"".concat(l,"voyage.webp"),"Jina AI":"".concat(l,"jina.png"),VolcEngine:"".concat(l,"volcengine.png"),DeepInfra:"".concat(l,"deepinfra.png")},i=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:o[e],displayName:e}}let t=Object.keys(a).find(t=>a[t].toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let r=n[t];return{logo:o[r],displayName:r}},c=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"azure/my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else return"gpt-3.5-turbo"},d=(e,t)=>{console.log("Provider key: ".concat(e));let r=a[e];console.log("Provider mapped to: ".concat(r));let n=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(e=>{let[t,s]=e;null!==s&&"object"==typeof s&&"litellm_provider"in s&&(s.litellm_provider===r||s.litellm_provider.includes(r))&&n.push(t)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(t).forEach(e=>{let[t,r]=e;null!==r&&"object"==typeof r&&"litellm_provider"in r&&"cohere_chat"===r.litellm_provider&&n.push(t)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(t).forEach(e=>{let[t,r]=e;null!==r&&"object"==typeof r&&"litellm_provider"in r&&"sagemaker_chat"===r.litellm_provider&&n.push(t)}))),n}},21425:function(e,t,r){"use strict";var n=r(57437);r(2265);var s=r(54507);t.Z=e=>{let{value:t,onChange:r,disabledCallbacks:a=[],onDisabledCallbacksChange:l}=e;return(0,n.jsx)(s.Z,{value:t,onChange:r,disabledCallbacks:a,onDisabledCallbacksChange:l})}},10901:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var n=r(57437),s=r(2265),a=r(13634),l=r(82680),o=r(73002),i=r(27281),c=r(57365),d=r(49566),u=r(92280),m=r(24199),h=e=>{var t,r,h;let{visible:p,onCancel:g,onSubmit:f,initialData:x,mode:v,config:b}=e,[y]=a.Z.useForm();console.log("Initial Data:",x),(0,s.useEffect)(()=>{if(p){if("edit"===v&&x){let e={...x,role:x.role||b.defaultRole,max_budget_in_team:x.max_budget_in_team||null,tpm_limit:x.tpm_limit||null,rpm_limit:x.rpm_limit||null};console.log("Setting form values:",e),y.setFieldsValue(e)}else{var e;y.resetFields(),y.setFieldsValue({role:b.defaultRole||(null===(e=b.roleOptions[0])||void 0===e?void 0:e.value)})}}},[p,x,v,y,b.defaultRole,b.roleOptions]);let _=async e=>{try{let t=Object.entries(e).reduce((e,t)=>{let[r,n]=t;if("string"==typeof n){let t=n.trim();return""===t&&("max_budget_in_team"===r||"tpm_limit"===r||"rpm_limit"===r)?{...e,[r]:null}:{...e,[r]:t}}return{...e,[r]:n}},{});console.log("Submitting form data:",t),f(t),y.resetFields()}catch(e){console.error("Form submission error:",e)}},j=e=>{switch(e.type){case"input":return(0,n.jsx)(d.Z,{placeholder:e.placeholder});case"numerical":return(0,n.jsx)(m.Z,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":var t;return(0,n.jsx)(i.Z,{children:null===(t=e.options)||void 0===t?void 0:t.map(e=>(0,n.jsx)(c.Z,{value:e.value,children:e.label},e.value))});default:return null}};return(0,n.jsx)(l.Z,{title:b.title||("add"===v?"Add Member":"Edit Member"),open:p,width:1e3,footer:null,onCancel:g,children:(0,n.jsxs)(a.Z,{form:y,onFinish:_,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[b.showEmail&&(0,n.jsx)(a.Z.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,n.jsx)(d.Z,{placeholder:"user@example.com"})}),b.showEmail&&b.showUserId&&(0,n.jsx)("div",{className:"text-center mb-4",children:(0,n.jsx)(u.x,{children:"OR"})}),b.showUserId&&(0,n.jsx)(a.Z.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,n.jsx)(d.Z,{placeholder:"user_123"})}),(0,n.jsx)(a.Z.Item,{label:(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{children:"Role"}),"edit"===v&&x&&(0,n.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(r=x.role,(null===(h=b.roleOptions.find(e=>e.value===r))||void 0===h?void 0:h.label)||r),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,n.jsx)(i.Z,{children:"edit"===v&&x?[...b.roleOptions.filter(e=>e.value===x.role),...b.roleOptions.filter(e=>e.value!==x.role)].map(e=>(0,n.jsx)(c.Z,{value:e.value,children:e.label},e.value)):b.roleOptions.map(e=>(0,n.jsx)(c.Z,{value:e.value,children:e.label},e.value))})}),null===(t=b.additionalFields)||void 0===t?void 0:t.map(e=>(0,n.jsx)(a.Z.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:j(e)},e.name)),(0,n.jsxs)("div",{className:"text-right mt-6",children:[(0,n.jsx)(o.ZP,{onClick:g,className:"mr-2",children:"Cancel"}),(0,n.jsx)(o.ZP,{type:"default",htmlType:"submit",children:"add"===v?"Add Member":"Save Changes"})]})]})})}},33304:function(e,t,r){"use strict";function n(e){return""===e?null:e}r.d(t,{C:function(){return n}})},49084:function(e,t,r){"use strict";var n=r(2265);let s=n.forwardRef(function(e,t){return n.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),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"}))});t.Z=s}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,2344,352,1487,7732,4851,8448,8049,131,2012,1598,2971,2117,1744],function(){return e(e.s=18530)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/organizations/page-780c2489fe818e99.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/organizations/page-b3984352a81218bf.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/organizations/page-780c2489fe818e99.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/organizations/page-b3984352a81218bf.js index c83d1d6ab5a..2e8f7e8dc59 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/organizations/page-780c2489fe818e99.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/organizations/page-b3984352a81218bf.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6459],{44243:function(e,r,t){Promise.resolve().then(t.bind(t,57616))},69993:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(1119),a=t(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},s=t(55015),l=a.forwardRef(function(e,r){return a.createElement(s.Z,(0,n.Z)({},e,{ref:r,icon:o}))})},47323:function(e,r,t){"use strict";t.d(r,{Z:function(){return h}});var n=t(5853),a=t(2265),o=t(1526),s=t(7084),l=t(97324),c=t(1153),i=t(26898);let d={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"}},u={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"}},m={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:""}},g=(e,r)=>{switch(e){case"simple":return{textColor:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,l.q)((0,c.bM)(r,i.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,l.q)((0,c.bM)(r,i.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:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,l.q)((0,c.bM)(r,i.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:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,l.q)((0,c.bM)(r,i.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,c.bM)(r,i.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,l.q)((0,c.bM)(r,i.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},f=(0,c.fn)("Icon"),h=a.forwardRef((e,r)=>{let{icon:t,variant:i="simple",tooltip:h,size:x=s.u8.SM,color:b,className:p}=e,v=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),w=g(i,b),{tooltipProps:k,getReferenceProps:N}=(0,o.l)();return a.createElement("span",Object.assign({ref:(0,c.lq)([r,k.refs.setReference]),className:(0,l.q)(f("root"),"inline-flex flex-shrink-0 items-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,m[i].rounded,m[i].border,m[i].shadow,m[i].ring,d[x].paddingX,d[x].paddingY,p)},N,v),a.createElement(o.Z,Object.assign({text:h},k)),a.createElement(t,{className:(0,l.q)(f("icon"),"shrink-0",u[x].height,u[x].width)}))});h.displayName="Icon"},21626:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("Table"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement("div",{className:(0,o.q)(s("root"),"overflow-auto",l)},a.createElement("table",Object.assign({ref:r,className:(0,o.q)(s("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},c),t))});l.displayName="Table"},97214:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableBody"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("tbody",Object.assign({ref:r,className:(0,o.q)(s("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",l)},c),t))});l.displayName="TableBody"},28241:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableCell"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("td",Object.assign({ref:r,className:(0,o.q)(s("root"),"align-middle whitespace-nowrap text-left p-4",l)},c),t))});l.displayName="TableCell"},58834:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableHead"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("thead",Object.assign({ref:r,className:(0,o.q)(s("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",l)},c),t))});l.displayName="TableHead"},69552:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableHeaderCell"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("th",Object.assign({ref:r,className:(0,o.q)(s("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content","dark:text-dark-tremor-content",l)},c),t))});l.displayName="TableHeaderCell"},71876:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableRow"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("tr",Object.assign({ref:r,className:(0,o.q)(s("row"),l)},c),t))});l.displayName="TableRow"},96761:function(e,r,t){"use strict";t.d(r,{Z:function(){return c}});var n=t(5853),a=t(26898),o=t(97324),s=t(1153),l=t(2265);let c=l.forwardRef((e,r)=>{let{color:t,children:c,className:i}=e,d=(0,n._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:r,className:(0,o.q)("font-medium text-tremor-title",t?(0,s.bM)(t,a.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",i)},d),c)});c.displayName="Title"},32489:function(e,r,t){"use strict";t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},40728:function(e,r,t){"use strict";t.d(r,{C:function(){return n.Z},x:function(){return a.Z}});var n=t(41649),a=t(84264)},57616:function(e,r,t){"use strict";t.r(r);var n=t(57437),a=t(22004),o=t(39760),s=t(2265),l=t(30874);r.default=()=>{let{userId:e,accessToken:r,userRole:t,premiumUser:c}=(0,o.Z)(),[i,d]=(0,s.useState)([]),[u,m]=(0,s.useState)([]);return(0,s.useEffect)(()=>{(0,a.g)(r,d).then(()=>{})},[r]),(0,s.useEffect)(()=>{(0,l.Nr)(e,t,r,m).then(()=>{})},[e,t,r]),(0,n.jsx)(a.Z,{organizations:i,userRole:t,userModels:u,accessToken:r,setOrganizations:d,premiumUser:c})}},98015:function(e,r,t){"use strict";t.d(r,{Z:function(){return h}});var n=t(57437),a=t(2265),o=t(92280),s=t(40728),l=t(79814),c=t(19250),i=function(e){let{vectorStores:r,accessToken:t}=e,[o,i]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(t&&0!==r.length)try{let e=await (0,c.vectorStoreListCall)(t);e.data&&i(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[t,r.length]);let d=e=>{let r=o.find(r=>r.vector_store_id===e);return r?"".concat(r.vector_store_name||r.vector_store_id," (").concat(r.vector_store_id,")"):e};return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,n.jsx)(s.C,{color:"blue",size:"xs",children:r.length})]}),r.length>0?(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map((e,r)=>(0,n.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:d(e)},r))}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(s.x,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},d=t(25327),u=t(86462),m=t(47686),g=t(89970),f=function(e){let{mcpServers:r,mcpAccessGroups:o=[],mcpToolPermissions:l={},accessToken:i}=e,[f,h]=(0,a.useState)([]),[x,b]=(0,a.useState)([]),[p,v]=(0,a.useState)(new Set),w=e=>{v(r=>{let t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t})};(0,a.useEffect)(()=>{(async()=>{if(i&&r.length>0)try{let e=await (0,c.fetchMCPServers)(i);e&&Array.isArray(e)?h(e):e.data&&Array.isArray(e.data)&&h(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[i,r.length]),(0,a.useEffect)(()=>{(async()=>{if(i&&o.length>0)try{let e=await Promise.resolve().then(t.bind(t,19250)).then(e=>e.fetchMCPAccessGroups(i));b(Array.isArray(e)?e:e.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[i,o.length]);let k=e=>{let r=f.find(r=>r.server_id===e);if(r){let t=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(r.alias," (").concat(t,")")}return e},N=e=>e,j=[...r.map(e=>({type:"server",value:e})),...o.map(e=>({type:"accessGroup",value:e}))],y=j.length;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(d.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,n.jsx)(s.C,{color:"blue",size:"xs",children:y})]}),y>0?(0,n.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:j.map((e,r)=>{let t="server"===e.type?l[e.value]:void 0,a=t&&t.length>0,o=p.has(e.value);return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{onClick:()=>a&&w(e.value),className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ".concat(a?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,n.jsx)(g.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,n.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:k(e.value)})]})}):(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,n.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:N(e.value)}),(0,n.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),a&&(0,n.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,n.jsx)("span",{className:"text-xs font-medium text-gray-600",children:t.length}),(0,n.jsx)("span",{className:"text-xs text-gray-500",children:1===t.length?"tool":"tools"}),o?(0,n.jsx)(u.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,n.jsx)(m.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&o&&(0,n.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.map((e,r)=>(0,n.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},r))})})]},r)})}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(s.x,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},h=function(e){let{objectPermission:r,variant:t="card",className:a="",accessToken:s}=e,l=(null==r?void 0:r.vector_stores)||[],c=(null==r?void 0:r.mcp_servers)||[],d=(null==r?void 0:r.mcp_access_groups)||[],u=(null==r?void 0:r.mcp_tool_permissions)||{},m=(0,n.jsxs)("div",{className:"card"===t?"grid grid-cols-1 md:grid-cols-2 gap-6":"space-y-4",children:[(0,n.jsx)(i,{vectorStores:l,accessToken:s}),(0,n.jsx)(f,{mcpServers:c,mcpAccessGroups:d,mcpToolPermissions:u,accessToken:s})]});return"card"===t?(0,n.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(a),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(o.x,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,n.jsx)(o.x,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),m]}):(0,n.jsxs)("div",{className:"".concat(a),children:[(0,n.jsx)(o.x,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),m]})}},10900:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});r.Z=a},91777:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});r.Z=a},47686:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});r.Z=a},82182:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});r.Z=a},79814:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});r.Z=a},53410:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.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"}))});r.Z=a},93416:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});r.Z=a},77355:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=a},22452:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});r.Z=a},25327:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});r.Z=a}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,5188,8049,131,2202,874,2004,2971,2117,1744],function(){return e(e.s=44243)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6459],{44243:function(e,r,t){Promise.resolve().then(t.bind(t,57616))},69993:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(1119),a=t(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},s=t(55015),l=a.forwardRef(function(e,r){return a.createElement(s.Z,(0,n.Z)({},e,{ref:r,icon:o}))})},47323:function(e,r,t){"use strict";t.d(r,{Z:function(){return h}});var n=t(5853),a=t(2265),o=t(1526),s=t(7084),l=t(97324),c=t(1153),i=t(26898);let d={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"}},u={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"}},m={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:""}},g=(e,r)=>{switch(e){case"simple":return{textColor:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,l.q)((0,c.bM)(r,i.K.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,l.q)((0,c.bM)(r,i.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:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:r?(0,l.q)((0,c.bM)(r,i.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:r?(0,c.bM)(r,i.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:r?(0,l.q)((0,c.bM)(r,i.K.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:r?(0,c.bM)(r,i.K.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:r?(0,l.q)((0,c.bM)(r,i.K.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}},f=(0,c.fn)("Icon"),h=a.forwardRef((e,r)=>{let{icon:t,variant:i="simple",tooltip:h,size:x=s.u8.SM,color:b,className:p}=e,v=(0,n._T)(e,["icon","variant","tooltip","size","color","className"]),w=g(i,b),{tooltipProps:k,getReferenceProps:N}=(0,o.l)();return a.createElement("span",Object.assign({ref:(0,c.lq)([r,k.refs.setReference]),className:(0,l.q)(f("root"),"inline-flex flex-shrink-0 items-center",w.bgColor,w.textColor,w.borderColor,w.ringColor,m[i].rounded,m[i].border,m[i].shadow,m[i].ring,d[x].paddingX,d[x].paddingY,p)},N,v),a.createElement(o.Z,Object.assign({text:h},k)),a.createElement(t,{className:(0,l.q)(f("icon"),"shrink-0",u[x].height,u[x].width)}))});h.displayName="Icon"},21626:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("Table"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement("div",{className:(0,o.q)(s("root"),"overflow-auto",l)},a.createElement("table",Object.assign({ref:r,className:(0,o.q)(s("table"),"w-full text-tremor-default","text-tremor-content","dark:text-dark-tremor-content")},c),t))});l.displayName="Table"},97214:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableBody"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("tbody",Object.assign({ref:r,className:(0,o.q)(s("root"),"align-top divide-y","divide-tremor-border","dark:divide-dark-tremor-border",l)},c),t))});l.displayName="TableBody"},28241:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableCell"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("td",Object.assign({ref:r,className:(0,o.q)(s("root"),"align-middle whitespace-nowrap text-left p-4",l)},c),t))});l.displayName="TableCell"},58834:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableHead"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("thead",Object.assign({ref:r,className:(0,o.q)(s("root"),"text-left","text-tremor-content","dark:text-dark-tremor-content",l)},c),t))});l.displayName="TableHead"},69552:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableHeaderCell"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("th",Object.assign({ref:r,className:(0,o.q)(s("root"),"whitespace-nowrap text-left font-semibold top-0 px-4 py-3.5","text-tremor-content","dark:text-dark-tremor-content",l)},c),t))});l.displayName="TableHeaderCell"},71876:function(e,r,t){"use strict";t.d(r,{Z:function(){return l}});var n=t(5853),a=t(2265),o=t(97324);let s=(0,t(1153).fn)("TableRow"),l=a.forwardRef((e,r)=>{let{children:t,className:l}=e,c=(0,n._T)(e,["children","className"]);return a.createElement(a.Fragment,null,a.createElement("tr",Object.assign({ref:r,className:(0,o.q)(s("row"),l)},c),t))});l.displayName="TableRow"},96761:function(e,r,t){"use strict";t.d(r,{Z:function(){return c}});var n=t(5853),a=t(26898),o=t(97324),s=t(1153),l=t(2265);let c=l.forwardRef((e,r)=>{let{color:t,children:c,className:i}=e,d=(0,n._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:r,className:(0,o.q)("font-medium text-tremor-title",t?(0,s.bM)(t,a.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",i)},d),c)});c.displayName="Title"},32489:function(e,r,t){"use strict";t.d(r,{Z:function(){return n}});let n=(0,t(79205).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},40728:function(e,r,t){"use strict";t.d(r,{C:function(){return n.Z},x:function(){return a.Z}});var n=t(41649),a=t(84264)},57616:function(e,r,t){"use strict";t.r(r);var n=t(57437),a=t(22004),o=t(80443),s=t(2265),l=t(30874);r.default=()=>{let{userId:e,accessToken:r,userRole:t,premiumUser:c}=(0,o.Z)(),[i,d]=(0,s.useState)([]),[u,m]=(0,s.useState)([]);return(0,s.useEffect)(()=>{(0,a.g)(r,d).then(()=>{})},[r]),(0,s.useEffect)(()=>{(0,l.Nr)(e,t,r,m).then(()=>{})},[e,t,r]),(0,n.jsx)(a.Z,{organizations:i,userRole:t,userModels:u,accessToken:r,setOrganizations:d,premiumUser:c})}},98015:function(e,r,t){"use strict";t.d(r,{Z:function(){return h}});var n=t(57437),a=t(2265),o=t(92280),s=t(40728),l=t(79814),c=t(19250),i=function(e){let{vectorStores:r,accessToken:t}=e,[o,i]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(t&&0!==r.length)try{let e=await (0,c.vectorStoreListCall)(t);e.data&&i(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[t,r.length]);let d=e=>{let r=o.find(r=>r.vector_store_id===e);return r?"".concat(r.vector_store_name||r.vector_store_id," (").concat(r.vector_store_id,")"):e};return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,n.jsx)(s.C,{color:"blue",size:"xs",children:r.length})]}),r.length>0?(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map((e,r)=>(0,n.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:d(e)},r))}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(l.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(s.x,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},d=t(25327),u=t(86462),m=t(47686),g=t(89970),f=function(e){let{mcpServers:r,mcpAccessGroups:o=[],mcpToolPermissions:l={},accessToken:i}=e,[f,h]=(0,a.useState)([]),[x,b]=(0,a.useState)([]),[p,v]=(0,a.useState)(new Set),w=e=>{v(r=>{let t=new Set(r);return t.has(e)?t.delete(e):t.add(e),t})};(0,a.useEffect)(()=>{(async()=>{if(i&&r.length>0)try{let e=await (0,c.fetchMCPServers)(i);e&&Array.isArray(e)?h(e):e.data&&Array.isArray(e.data)&&h(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[i,r.length]),(0,a.useEffect)(()=>{(async()=>{if(i&&o.length>0)try{let e=await Promise.resolve().then(t.bind(t,19250)).then(e=>e.fetchMCPAccessGroups(i));b(Array.isArray(e)?e:e.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[i,o.length]);let k=e=>{let r=f.find(r=>r.server_id===e);if(r){let t=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(r.alias," (").concat(t,")")}return e},N=e=>e,j=[...r.map(e=>({type:"server",value:e})),...o.map(e=>({type:"accessGroup",value:e}))],y=j.length;return(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(d.Z,{className:"h-4 w-4 text-blue-600"}),(0,n.jsx)(s.x,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,n.jsx)(s.C,{color:"blue",size:"xs",children:y})]}),y>0?(0,n.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:j.map((e,r)=>{let t="server"===e.type?l[e.value]:void 0,a=t&&t.length>0,o=p.has(e.value);return(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{onClick:()=>a&&w(e.value),className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ".concat(a?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,n.jsx)(g.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,n.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:k(e.value)})]})}):(0,n.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,n.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,n.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:N(e.value)}),(0,n.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),a&&(0,n.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,n.jsx)("span",{className:"text-xs font-medium text-gray-600",children:t.length}),(0,n.jsx)("span",{className:"text-xs text-gray-500",children:1===t.length?"tool":"tools"}),o?(0,n.jsx)(u.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,n.jsx)(m.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),a&&o&&(0,n.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.map((e,r)=>(0,n.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},r))})})]},r)})}):(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,n.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"}),(0,n.jsx)(s.x,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},h=function(e){let{objectPermission:r,variant:t="card",className:a="",accessToken:s}=e,l=(null==r?void 0:r.vector_stores)||[],c=(null==r?void 0:r.mcp_servers)||[],d=(null==r?void 0:r.mcp_access_groups)||[],u=(null==r?void 0:r.mcp_tool_permissions)||{},m=(0,n.jsxs)("div",{className:"card"===t?"grid grid-cols-1 md:grid-cols-2 gap-6":"space-y-4",children:[(0,n.jsx)(i,{vectorStores:l,accessToken:s}),(0,n.jsx)(f,{mcpServers:c,mcpAccessGroups:d,mcpToolPermissions:u,accessToken:s})]});return"card"===t?(0,n.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(a),children:[(0,n.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(o.x,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,n.jsx)(o.x,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),m]}):(0,n.jsxs)("div",{className:"".concat(a),children:[(0,n.jsx)(o.x,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),m]})}},10900:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});r.Z=a},91777:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});r.Z=a},47686:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});r.Z=a},82182:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});r.Z=a},79814:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});r.Z=a},53410:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.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"}))});r.Z=a},93416:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.232 5.232l3.536 3.536m-2.036-5.036a2.5 2.5 0 113.536 3.536L6.5 21.036H3v-3.572L16.732 3.732z"}))});r.Z=a},77355:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"}))});r.Z=a},22452:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"}))});r.Z=a},25327:function(e,r,t){"use strict";var n=t(2265);let a=n.forwardRef(function(e,r){return n.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:r},e),n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});r.Z=a}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,5188,8049,131,2202,874,2004,2971,2117,1744],function(){return e(e.s=44243)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/admin-settings/page-2eb58335a1815840.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/admin-settings/page-e0b752319b5f23e3.js similarity index 93% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/admin-settings/page-2eb58335a1815840.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/admin-settings/page-e0b752319b5f23e3.js index d84ea4c6603..8950c1980a7 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/admin-settings/page-2eb58335a1815840.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/admin-settings/page-e0b752319b5f23e3.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8958],{22489:function(e,n,r){Promise.resolve().then(r.bind(r,8786))},25512:function(e,n,r){"use strict";r.d(n,{P:function(){return t.Z},Q:function(){return u.Z}});var t=r(27281),u=r(57365)},56522:function(e,n,r){"use strict";r.d(n,{o:function(){return u.Z},x:function(){return t.Z}});var t=r(84264),u=r(49566)},39760:function(e,n,r){"use strict";var t=r(2265),u=r(99376),l=r(14474),i=r(3914);n.Z=()=>{var e,n,r,a,o,s,c;let d=(0,u.useRouter)(),f="undefined"!=typeof document?(0,i.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let _=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,l.o)(f)}catch(e){return(0,i.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==_?void 0:_.key)&&void 0!==e?e:null,userId:null!==(n=null==_?void 0:_.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==_?void 0:_.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==_?void 0:_.user_role)&&void 0!==a?a:null),premiumUser:null!==(o=null==_?void 0:_.premium_user)&&void 0!==o?o:null,disabledPersonalKeyCreation:null!==(s=null==_?void 0:_.disabled_non_admin_personal_key_creation)&&void 0!==s?s:null,showSSOBanner:(null==_?void 0:_.login_method)==="username_password"}}},11318:function(e,n,r){"use strict";r.d(n,{Z:function(){return a}});var t=r(2265),u=r(39760),l=r(19250);let i=async(e,n,r,t)=>"Admin"!=r&&"Admin Viewer"!=r?await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null,n):await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null);var a=()=>{let[e,n]=(0,t.useState)([]),{accessToken:r,userId:l,userRole:a}=(0,u.Z)();return(0,t.useEffect)(()=>{(async()=>{n(await i(r,l,a,null))})()},[r,l,a]),{teams:e,setTeams:n}}},8786:function(e,n,r){"use strict";r.r(n);var t=r(57437),u=r(90773),l=r(39760),i=r(2265),a=r(11318);n.default=()=>{let{teams:e,setTeams:n}=(0,a.Z)(),[r,o]=(0,i.useState)(()=>new URLSearchParams(window.location.search)),{accessToken:s,userId:c,premiumUser:d,showSSOBanner:f}=(0,l.Z)();return(0,t.jsx)(u.Z,{searchParams:r,accessToken:s,userID:c,setTeams:n,showSSOBanner:f,premiumUser:d})}},12363:function(e,n,r){"use strict";r.d(n,{d:function(){return l},n:function(){return u}});var t=r(2265);let u=()=>{let[e,n]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:r}=window.location;n("".concat(e,"//").concat(r))}},[]),e},l=25}},function(e){e.O(0,[1114,1491,4556,2417,2926,9775,9678,7281,2052,8049,773,2971,2117,1744],function(){return e(e.s=22489)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8958],{22489:function(e,n,r){Promise.resolve().then(r.bind(r,8786))},25512:function(e,n,r){"use strict";r.d(n,{P:function(){return t.Z},Q:function(){return u.Z}});var t=r(27281),u=r(57365)},56522:function(e,n,r){"use strict";r.d(n,{o:function(){return u.Z},x:function(){return t.Z}});var t=r(84264),u=r(49566)},80443:function(e,n,r){"use strict";var t=r(2265),u=r(99376),l=r(14474),i=r(3914);n.Z=()=>{var e,n,r,a,o,s,c;let d=(0,u.useRouter)(),f="undefined"!=typeof document?(0,i.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let _=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,l.o)(f)}catch(e){return(0,i.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==_?void 0:_.key)&&void 0!==e?e:null,userId:null!==(n=null==_?void 0:_.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==_?void 0:_.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(a=null==_?void 0:_.user_role)&&void 0!==a?a:null),premiumUser:null!==(o=null==_?void 0:_.premium_user)&&void 0!==o?o:null,disabledPersonalKeyCreation:null!==(s=null==_?void 0:_.disabled_non_admin_personal_key_creation)&&void 0!==s?s:null,showSSOBanner:(null==_?void 0:_.login_method)==="username_password"}}},11318:function(e,n,r){"use strict";r.d(n,{Z:function(){return a}});var t=r(2265),u=r(80443),l=r(19250);let i=async(e,n,r,t)=>"Admin"!=r&&"Admin Viewer"!=r?await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null,n):await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null);var a=()=>{let[e,n]=(0,t.useState)([]),{accessToken:r,userId:l,userRole:a}=(0,u.Z)();return(0,t.useEffect)(()=>{(async()=>{n(await i(r,l,a,null))})()},[r,l,a]),{teams:e,setTeams:n}}},8786:function(e,n,r){"use strict";r.r(n);var t=r(57437),u=r(90773),l=r(80443),i=r(2265),a=r(11318);n.default=()=>{let{teams:e,setTeams:n}=(0,a.Z)(),[r,o]=(0,i.useState)(()=>new URLSearchParams(window.location.search)),{accessToken:s,userId:c,premiumUser:d,showSSOBanner:f}=(0,l.Z)();return(0,t.jsx)(u.Z,{searchParams:r,accessToken:s,userID:c,setTeams:n,showSSOBanner:f,premiumUser:d})}},12363:function(e,n,r){"use strict";r.d(n,{d:function(){return l},n:function(){return u}});var t=r(2265);let u=()=>{let[e,n]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:r}=window.location;n("".concat(e,"//").concat(r))}},[]),e},l=25}},function(e){e.O(0,[1114,1491,4556,2417,2926,9775,9678,7281,2052,8049,773,2971,2117,1744],function(){return e(e.s=22489)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/logging-and-alerts/page-2dd68c688405947c.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/logging-and-alerts/page-e74cb0886bb1ae12.js similarity index 96% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/logging-and-alerts/page-2dd68c688405947c.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/logging-and-alerts/page-e74cb0886bb1ae12.js index 3a54f98b4a7..a3db211880d 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/logging-and-alerts/page-2dd68c688405947c.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/logging-and-alerts/page-e74cb0886bb1ae12.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2445],{96354:function(e,n,a){Promise.resolve().then(a.bind(a,72719))},39760:function(e,n,a){"use strict";var t=a(2265),r=a(99376),s=a(14474),i=a(3914);n.Z=()=>{var e,n,a,o,l,g,u;let _=(0,r.useRouter)(),p="undefined"!=typeof document?(0,i.e)("token"):null;(0,t.useEffect)(()=>{p||_.replace("/sso/key/generate")},[p,_]);let d=(0,t.useMemo)(()=>{if(!p)return null;try{return(0,s.o)(p)}catch(e){return(0,i.b)(),_.replace("/sso/key/generate"),null}},[p,_]);return{token:p,accessToken:null!==(e=null==d?void 0:d.key)&&void 0!==e?e:null,userId:null!==(n=null==d?void 0:d.user_id)&&void 0!==n?n:null,userEmail:null!==(a=null==d?void 0:d.user_email)&&void 0!==a?a:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(o=null==d?void 0:d.user_role)&&void 0!==o?o:null),premiumUser:null!==(l=null==d?void 0:d.premium_user)&&void 0!==l?l:null,disabledPersonalKeyCreation:null!==(g=null==d?void 0:d.disabled_non_admin_personal_key_creation)&&void 0!==g?g:null,showSSOBanner:(null==d?void 0:d.login_method)==="username_password"}}},72719:function(e,n,a){"use strict";a.r(n);var t=a(57437),r=a(6925),s=a(39760);n.default=()=>{let{accessToken:e,userRole:n,userId:a,premiumUser:i}=(0,s.Z)();return(0,t.jsx)(r.Z,{accessToken:e,userRole:n,userID:a,premiumUser:i})}},97434:function(e,n,a){"use strict";a.d(n,{Dg:function(){return s},Lo:function(){return i},O0:function(){return r},PA:function(){return g},RD:function(){return o},Z3:function(){return l},_3:function(){return u}});let t="/ui/assets/logos/",r=[{id:"arize",displayName:"Arize",logo:"".concat(t,"arize.png"),supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_key:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:"".concat(t,"braintrust.png"),supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",logo:"".concat(t,"custom.svg"),supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:"".concat(t,"datadog.png"),supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:"".concat(t,"lago.svg"),supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:"".concat(t,"langfuse.png"),supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:"".concat(t,"langfuse.png"),supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:"".concat(t,"langsmith.png"),supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:"".concat(t,"openmeter.png"),supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:"".concat(t,"otel.png"),supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:"".concat(t,"aws.svg"),supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"}],s=r.reduce((e,n)=>(e[n.displayName]=n,e),{}),i=r.reduce((e,n)=>(e[n.displayName]=n.id,e),{}),o=r.reduce((e,n)=>(e[n.id]=n.displayName,e),{}),l=e=>e.map(e=>i[e]||e),g=e=>e.map(e=>o[e]||e),u=e=>r.find(n=>n.id===e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,9775,2284,7908,9678,226,8049,6925,2971,2117,1744],function(){return e(e.s=96354)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2445],{96354:function(e,n,a){Promise.resolve().then(a.bind(a,72719))},80443:function(e,n,a){"use strict";var t=a(2265),r=a(99376),s=a(14474),i=a(3914);n.Z=()=>{var e,n,a,o,l,g,u;let _=(0,r.useRouter)(),p="undefined"!=typeof document?(0,i.e)("token"):null;(0,t.useEffect)(()=>{p||_.replace("/sso/key/generate")},[p,_]);let d=(0,t.useMemo)(()=>{if(!p)return null;try{return(0,s.o)(p)}catch(e){return(0,i.b)(),_.replace("/sso/key/generate"),null}},[p,_]);return{token:p,accessToken:null!==(e=null==d?void 0:d.key)&&void 0!==e?e:null,userId:null!==(n=null==d?void 0:d.user_id)&&void 0!==n?n:null,userEmail:null!==(a=null==d?void 0:d.user_email)&&void 0!==a?a:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(o=null==d?void 0:d.user_role)&&void 0!==o?o:null),premiumUser:null!==(l=null==d?void 0:d.premium_user)&&void 0!==l?l:null,disabledPersonalKeyCreation:null!==(g=null==d?void 0:d.disabled_non_admin_personal_key_creation)&&void 0!==g?g:null,showSSOBanner:(null==d?void 0:d.login_method)==="username_password"}}},72719:function(e,n,a){"use strict";a.r(n);var t=a(57437),r=a(6925),s=a(80443);n.default=()=>{let{accessToken:e,userRole:n,userId:a,premiumUser:i}=(0,s.Z)();return(0,t.jsx)(r.Z,{accessToken:e,userRole:n,userID:a,premiumUser:i})}},97434:function(e,n,a){"use strict";a.d(n,{Dg:function(){return s},Lo:function(){return i},O0:function(){return r},PA:function(){return g},RD:function(){return o},Z3:function(){return l},_3:function(){return u}});let t="/ui/assets/logos/",r=[{id:"arize",displayName:"Arize",logo:"".concat(t,"arize.png"),supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_key:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:"".concat(t,"braintrust.png"),supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",logo:"".concat(t,"custom.svg"),supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"datadog",displayName:"Datadog",logo:"".concat(t,"datadog.png"),supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:"".concat(t,"lago.svg"),supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:"".concat(t,"langfuse.png"),supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:"".concat(t,"langfuse.png"),supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:"".concat(t,"langsmith.png"),supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:"".concat(t,"openmeter.png"),supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:"".concat(t,"otel.png"),supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:"".concat(t,"aws.svg"),supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"}],s=r.reduce((e,n)=>(e[n.displayName]=n,e),{}),i=r.reduce((e,n)=>(e[n.displayName]=n.id,e),{}),o=r.reduce((e,n)=>(e[n.id]=n.displayName,e),{}),l=e=>e.map(e=>i[e]||e),g=e=>e.map(e=>o[e]||e),u=e=>r.find(n=>n.id===e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,9775,2284,7908,9678,226,8049,6925,2971,2117,1744],function(){return e(e.s=96354)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/router-settings/page-ae3eb6d2dd0a7482.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/router-settings/page-bee996411f1fcc21.js similarity index 95% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/router-settings/page-ae3eb6d2dd0a7482.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/router-settings/page-bee996411f1fcc21.js index e8d231592a4..fb37b53b56c 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/router-settings/page-ae3eb6d2dd0a7482.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/router-settings/page-bee996411f1fcc21.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8021],{40915:function(e,n,r){Promise.resolve().then(r.bind(r,14809))},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return u.Z}});var u=r(20831)},2967:function(e,n,r){"use strict";r.d(n,{JO:function(){return t.Z},RM:function(){return l.Z},SC:function(){return c.Z},iA:function(){return o.Z},pj:function(){return i.Z},ss:function(){return s.Z},xs:function(){return a.Z},zx:function(){return u.Z}});var u=r(20831),t=r(47323),o=r(21626),l=r(97214),i=r(28241),s=r(58834),a=r(69552),c=r(71876)},58643:function(e,n,r){"use strict";r.d(n,{OK:function(){return u.Z},nP:function(){return i.Z},td:function(){return o.Z},v0:function(){return t.Z},x4:function(){return l.Z}});var u=r(12485),t=r(18135),o=r(35242),l=r(29706),i=r(77991)},39760:function(e,n,r){"use strict";var u=r(2265),t=r(99376),o=r(14474),l=r(3914);n.Z=()=>{var e,n,r,i,s,a,c;let d=(0,t.useRouter)(),f="undefined"!=typeof document?(0,l.e)("token"):null;(0,u.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let _=(0,u.useMemo)(()=>{if(!f)return null;try{return(0,o.o)(f)}catch(e){return(0,l.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==_?void 0:_.key)&&void 0!==e?e:null,userId:null!==(n=null==_?void 0:_.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==_?void 0:_.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(i=null==_?void 0:_.user_role)&&void 0!==i?i:null),premiumUser:null!==(s=null==_?void 0:_.premium_user)&&void 0!==s?s:null,disabledPersonalKeyCreation:null!==(a=null==_?void 0:_.disabled_non_admin_personal_key_creation)&&void 0!==a?a:null,showSSOBanner:(null==_?void 0:_.login_method)==="username_password"}}},14809:function(e,n,r){"use strict";r.r(n);var u=r(57437),t=r(64289),o=r(39760);n.default=()=>{let{accessToken:e,userRole:n,userId:r}=(0,o.Z)();return(0,u.jsx)(t.Z,{accessToken:e,userRole:n,userID:r,modelData:{}})}},51601:function(e,n,r){"use strict";r.d(n,{p:function(){return t}});var u=r(19250);let t=async e=>{try{let n=await (0,u.modelHubCall)(e);if(console.log("model_info:",n),(null==n?void 0:n.data.length)>0){let e=n.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,n)=>e.model_group.localeCompare(n.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}}},function(e){e.O(0,[1114,1491,4556,2417,2926,6433,1223,524,8049,4289,2971,2117,1744],function(){return e(e.s=40915)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8021],{40915:function(e,n,r){Promise.resolve().then(r.bind(r,14809))},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return u.Z}});var u=r(20831)},2967:function(e,n,r){"use strict";r.d(n,{JO:function(){return t.Z},RM:function(){return l.Z},SC:function(){return c.Z},iA:function(){return o.Z},pj:function(){return i.Z},ss:function(){return s.Z},xs:function(){return a.Z},zx:function(){return u.Z}});var u=r(20831),t=r(47323),o=r(21626),l=r(97214),i=r(28241),s=r(58834),a=r(69552),c=r(71876)},58643:function(e,n,r){"use strict";r.d(n,{OK:function(){return u.Z},nP:function(){return i.Z},td:function(){return o.Z},v0:function(){return t.Z},x4:function(){return l.Z}});var u=r(12485),t=r(18135),o=r(35242),l=r(29706),i=r(77991)},80443:function(e,n,r){"use strict";var u=r(2265),t=r(99376),o=r(14474),l=r(3914);n.Z=()=>{var e,n,r,i,s,a,c;let d=(0,t.useRouter)(),f="undefined"!=typeof document?(0,l.e)("token"):null;(0,u.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let _=(0,u.useMemo)(()=>{if(!f)return null;try{return(0,o.o)(f)}catch(e){return(0,l.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==_?void 0:_.key)&&void 0!==e?e:null,userId:null!==(n=null==_?void 0:_.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==_?void 0:_.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(i=null==_?void 0:_.user_role)&&void 0!==i?i:null),premiumUser:null!==(s=null==_?void 0:_.premium_user)&&void 0!==s?s:null,disabledPersonalKeyCreation:null!==(a=null==_?void 0:_.disabled_non_admin_personal_key_creation)&&void 0!==a?a:null,showSSOBanner:(null==_?void 0:_.login_method)==="username_password"}}},14809:function(e,n,r){"use strict";r.r(n);var u=r(57437),t=r(64289),o=r(80443);n.default=()=>{let{accessToken:e,userRole:n,userId:r}=(0,o.Z)();return(0,u.jsx)(t.Z,{accessToken:e,userRole:n,userID:r,modelData:{}})}},51601:function(e,n,r){"use strict";r.d(n,{p:function(){return t}});var u=r(19250);let t=async e=>{try{let n=await (0,u.modelHubCall)(e);if(console.log("model_info:",n),(null==n?void 0:n.data.length)>0){let e=n.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,n)=>e.model_group.localeCompare(n.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}}},function(e){e.O(0,[1114,1491,4556,2417,2926,6433,1223,524,8049,4289,2971,2117,1744],function(){return e(e.s=40915)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/ui-theme/page-0f2f3ef3fbd6b918.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/ui-theme/page-0194d673a7ecabbb.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/ui-theme/page-0f2f3ef3fbd6b918.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/ui-theme/page-0194d673a7ecabbb.js index 78f2b84e102..602908839af 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/ui-theme/page-0f2f3ef3fbd6b918.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/settings/ui-theme/page-0194d673a7ecabbb.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3117],{46034:function(e,t,r){Promise.resolve().then(r.bind(r,8719))},20831:function(e,t,r){"use strict";r.d(t,{Z:function(){return _}});var o=r(5853),n=r(1526),a=r(2265);let i=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],l=e=>({_s:e,status:i[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),s=e=>e?6:5,d=(e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return s(t)}},c=e=>"object"==typeof e?[e.enter,e.exit]:[e,e],u=(e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0),m=(e,t,r,o,n)=>{clearTimeout(o.current);let a=l(e);t(a),r.current=a,n&&n({current:a})},g=({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:n,initialEntered:i,mountOnEnter:g,unmountOnExit:h,onStateChange:p}={})=>{let[f,x]=(0,a.useState)(()=>l(i?2:s(g))),b=(0,a.useRef)(f),v=(0,a.useRef)(),[k,w]=c(n),y=(0,a.useCallback)(()=>{let e=d(b.current._s,h);e&&m(e,x,b,v,p)},[p,h]),C=(0,a.useCallback)(n=>{let a=e=>{switch(m(e,x,b,v,p),e){case 1:k>=0&&(v.current=setTimeout(y,k));break;case 4:w>=0&&(v.current=setTimeout(y,w));break;case 0:case 3:v.current=u(a,e)}},i=b.current.isEnter;"boolean"!=typeof n&&(n=!i),n?i||a(e?r?0:1:2):i&&a(t?o?3:4:s(h))},[y,p,e,t,r,o,k,w,h]);return(0,a.useEffect)(()=>()=>clearTimeout(v.current),[]),[f,C,y]};var h=r(7084),p=r(97324),f=r(1153);let x=e=>{var t=(0,o._T)(e,[]);return a.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.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=r(26898);let v={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"}},k=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,f.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,f.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,f.bM)(t,b.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,f.bM)(t,b.K.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,f.bM)(t,b.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,f.bM)(t,b.K.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,f.bM)(t,b.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,f.bM)(t,b.K.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,f.bM)("transparent").bgColor,hoverBgColor:t?(0,p.q)((0,f.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,f.bM)(t,b.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,f.bM)(t,b.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,f.bM)(t,b.K.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,f.bM)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},y=(0,f.fn)("Button"),C=e=>{let{loading:t,iconSize:r,iconPosition:o,Icon:n,needMargin:i,transitionStatus:l}=e,s=i?o===h.zS.Left?(0,p.q)("-ml-1","mr-1.5"):(0,p.q)("-mr-1","ml-1.5"):"",d=(0,p.q)("w-0 h-0"),c={default:d,entering:d,entered:r,exiting:r,exited:d};return t?a.createElement(x,{className:(0,p.q)(y("icon"),"animate-spin shrink-0",s,c.default,c[l]),style:{transition:"width 150ms"}}):a.createElement(n,{className:(0,p.q)(y("icon"),"shrink-0",r,s)})},_=a.forwardRef((e,t)=>{let{icon:r,iconPosition:i=h.zS.Left,size:l=h.u8.SM,color:s,variant:d="primary",disabled:c,loading:u=!1,loadingText:m,children:x,tooltip:b,className:_}=e,E=(0,o._T)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),N=u||c,j=void 0!==r||u,S=u&&m,T=!(!x&&!S),z=(0,p.q)(v[l].height,v[l].width),M="light"!==d?(0,p.q)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",B=w(d,s),L=k(d)[l],{tooltipProps:R,getReferenceProps:Z}=(0,n.l)(300),[P,q]=g({timeout:50});return(0,a.useEffect)(()=>{q(u)},[u]),a.createElement("button",Object.assign({ref:(0,f.lq)([t,R.refs.setReference]),className:(0,p.q)(y("root"),"flex-shrink-0 inline-flex justify-center items-center group font-medium outline-none",M,L.paddingX,L.paddingY,L.fontSize,B.textColor,B.bgColor,B.borderColor,B.hoverBorderColor,N?"opacity-50 cursor-not-allowed":(0,p.q)(w(d,s).hoverTextColor,w(d,s).hoverBgColor,w(d,s).hoverBorderColor),_),disabled:N},Z,E),a.createElement(n.Z,Object.assign({text:b},R)),j&&i!==h.zS.Right?a.createElement(C,{loading:u,iconSize:z,iconPosition:i,Icon:r,transitionStatus:P.status,needMargin:T}):null,S||x?a.createElement("span",{className:(0,p.q)(y("text"),"text-tremor-default whitespace-nowrap")},S?m:x):null,j&&i===h.zS.Right?a.createElement(C,{loading:u,iconSize:z,iconPosition:i,Icon:r,transitionStatus:P.status,needMargin:T}):null)});_.displayName="Button"},12514:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var o=r(5853),n=r(2265),a=r(7084),i=r(26898),l=r(97324),s=r(1153);let d=(0,s.fn)("Card"),c=e=>{if(!e)return"";switch(e){case a.zS.Left:return"border-l-4";case a.m.Top:return"border-t-4";case a.zS.Right:return"border-r-4";case a.m.Bottom:return"border-b-4";default:return""}},u=n.forwardRef((e,t)=>{let{decoration:r="",decorationColor:a,children:u,className:m}=e,g=(0,o._T)(e,["decoration","decorationColor","children","className"]);return n.createElement("div",Object.assign({ref:t,className:(0,l.q)(d("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",a?(0,s.bM)(a,i.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",c(r),m)},g),u)});u.displayName="Card"},84264:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var o=r(26898),n=r(97324),a=r(1153),i=r(2265);let l=i.forwardRef((e,t)=>{let{color:r,className:l,children:s}=e;return i.createElement("p",{ref:t,className:(0,n.q)("text-tremor-default",r?(0,a.bM)(r,o.K.text).textColor:(0,n.q)("text-tremor-content","dark:text-dark-tremor-content"),l)},s)});l.displayName="Text"},96761:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var o=r(5853),n=r(26898),a=r(97324),i=r(1153),l=r(2265);let s=l.forwardRef((e,t)=>{let{color:r,children:s,className:d}=e,c=(0,o._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:t,className:(0,a.q)("font-medium text-tremor-title",r?(0,i.bM)(r,n.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",d)},c),s)});s.displayName="Title"},19046:function(e,t,r){"use strict";r.d(t,{Dx:function(){return l.Z},Zb:function(){return n.Z},oi:function(){return i.Z},xv:function(){return a.Z},zx:function(){return o.Z}});var o=r(20831),n=r(12514),a=r(84264),i=r(49566),l=r(96761)},39760:function(e,t,r){"use strict";var o=r(2265),n=r(99376),a=r(14474),i=r(3914);t.Z=()=>{var e,t,r,l,s,d,c;let u=(0,n.useRouter)(),m="undefined"!=typeof document?(0,i.e)("token"):null;(0,o.useEffect)(()=>{m||u.replace("/sso/key/generate")},[m,u]);let g=(0,o.useMemo)(()=>{if(!m)return null;try{return(0,a.o)(m)}catch(e){return(0,i.b)(),u.replace("/sso/key/generate"),null}},[m,u]);return{token:m,accessToken:null!==(e=null==g?void 0:g.key)&&void 0!==e?e:null,userId:null!==(t=null==g?void 0:g.user_id)&&void 0!==t?t:null,userEmail:null!==(r=null==g?void 0:g.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==g?void 0:g.user_role)&&void 0!==l?l:null),premiumUser:null!==(s=null==g?void 0:g.premium_user)&&void 0!==s?s:null,disabledPersonalKeyCreation:null!==(d=null==g?void 0:g.disabled_non_admin_personal_key_creation)&&void 0!==d?d:null,showSSOBanner:(null==g?void 0:g.login_method)==="username_password"}}},8719:function(e,t,r){"use strict";r.r(t);var o=r(57437),n=r(5183),a=r(39760);t.default=()=>{let{userId:e,userRole:t,accessToken:r}=(0,a.Z)();return(0,o.jsx)(n.Z,{userID:e,userRole:t,accessToken:r})}},5183:function(e,t,r){"use strict";var o=r(57437),n=r(2265),a=r(19046),i=r(69734),l=r(19250),s=r(9114);t.Z=e=>{let{userID:t,userRole:r,accessToken:d}=e,{logoUrl:c,setLogoUrl:u}=(0,i.F)(),[m,g]=(0,n.useState)(""),[h,p]=(0,n.useState)(!1);(0,n.useEffect)(()=>{d&&f()},[d]);let f=async()=>{try{let t=(0,l.getProxyBaseUrl)(),r=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{Authorization:"Bearer ".concat(d),"Content-Type":"application/json"}});if(r.ok){var e;let t=await r.json(),o=(null===(e=t.values)||void 0===e?void 0:e.logo_url)||"";g(o),u(o||null)}}catch(e){console.error("Error fetching theme settings:",e)}},x=async()=>{p(!0);try{let e=(0,l.getProxyBaseUrl)();if((await fetch(e?"".concat(e,"/update/ui_theme_settings"):"/update/ui_theme_settings",{method:"PATCH",headers:{Authorization:"Bearer ".concat(d),"Content-Type":"application/json"},body:JSON.stringify({logo_url:m||null})})).ok)s.Z.success("Logo settings updated successfully!"),u(m||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating logo settings:",e),s.Z.fromBackend("Failed to update logo settings")}finally{p(!1)}},b=async()=>{g(""),u(null),p(!0);try{let e=(0,l.getProxyBaseUrl)();if((await fetch(e?"".concat(e,"/update/ui_theme_settings"):"/update/ui_theme_settings",{method:"PATCH",headers:{Authorization:"Bearer ".concat(d),"Content-Type":"application/json"},body:JSON.stringify({logo_url:null})})).ok)s.Z.success("Logo reset to default!");else throw Error("Failed to reset logo")}catch(e){console.error("Error resetting logo:",e),s.Z.fromBackend("Failed to reset logo")}finally{p(!1)}};return d?(0,o.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,o.jsxs)("div",{className:"mb-8",children:[(0,o.jsx)(a.Dx,{className:"text-2xl font-bold mb-2",children:"Logo Customization"}),(0,o.jsx)(a.xv,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo."})]}),(0,o.jsx)(a.Zb,{className:"shadow-sm p-6",children:(0,o.jsxs)("div",{className:"space-y-6",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(a.xv,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,o.jsx)(a.oi,{placeholder:"https://example.com/logo.png",value:m,onValueChange:e=>{g(e),u(e||null)},className:"w-full"}),(0,o.jsx)(a.xv,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty to use the default LiteLLM logo"})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(a.xv,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Current Logo"}),(0,o.jsx)("div",{className:"bg-gray-50 rounded-lg p-6 flex items-center justify-center min-h-[120px]",children:m?(0,o.jsx)("img",{src:m,alt:"Custom logo",className:"max-w-full max-h-24 object-contain",onError:e=>{var t;let r=e.target;r.style.display="none";let o=document.createElement("div");o.className="text-gray-500 text-sm",o.textContent="Failed to load image",null===(t=r.parentElement)||void 0===t||t.appendChild(o)}}):(0,o.jsx)(a.xv,{className:"text-gray-500 text-sm",children:"Default LiteLLM logo will be used"})})]}),(0,o.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,o.jsx)(a.zx,{onClick:x,loading:h,disabled:h,color:"indigo",children:"Save Changes"}),(0,o.jsx)(a.zx,{onClick:b,loading:h,disabled:h,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}},69734:function(e,t,r){"use strict";r.d(t,{F:function(){return l},f:function(){return s}});var o=r(57437),n=r(2265),a=r(19250);let i=(0,n.createContext)(void 0),l=()=>{let e=(0,n.useContext)(i);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},s=e=>{let{children:t,accessToken:r}=e,[l,s]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(async()=>{try{let t=(0,a.getProxyBaseUrl)(),r=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{"Content-Type":"application/json"}});if(r.ok){var e;let t=await r.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&s(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[]),(0,o.jsx)(i.Provider,{value:{logoUrl:l,setLogoUrl:s},children:t})}},14474:function(e,t,r){"use strict";r.d(t,{o:function(){return n}});class o extends Error{}function n(e,t){let r;if("string"!=typeof e)throw new o("Invalid token specified: must be a string");t||(t={});let n=!0===t.header?0:1,a=e.split(".")[n];if("string"!=typeof a)throw new o(`Invalid token specified: missing part #${n+1}`);try{r=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 r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(a)}catch(e){throw new o(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new o(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}o.prototype.name="InvalidTokenError"}},function(e){e.O(0,[1114,1491,4556,8049,2971,2117,1744],function(){return e(e.s=46034)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3117],{46034:function(e,t,r){Promise.resolve().then(r.bind(r,8719))},20831:function(e,t,r){"use strict";r.d(t,{Z:function(){return _}});var o=r(5853),n=r(1526),a=r(2265);let i=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],l=e=>({_s:e,status:i[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),s=e=>e?6:5,d=(e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return s(t)}},c=e=>"object"==typeof e?[e.enter,e.exit]:[e,e],u=(e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0),m=(e,t,r,o,n)=>{clearTimeout(o.current);let a=l(e);t(a),r.current=a,n&&n({current:a})},g=({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:n,initialEntered:i,mountOnEnter:g,unmountOnExit:h,onStateChange:p}={})=>{let[f,x]=(0,a.useState)(()=>l(i?2:s(g))),b=(0,a.useRef)(f),v=(0,a.useRef)(),[k,w]=c(n),y=(0,a.useCallback)(()=>{let e=d(b.current._s,h);e&&m(e,x,b,v,p)},[p,h]),C=(0,a.useCallback)(n=>{let a=e=>{switch(m(e,x,b,v,p),e){case 1:k>=0&&(v.current=setTimeout(y,k));break;case 4:w>=0&&(v.current=setTimeout(y,w));break;case 0:case 3:v.current=u(a,e)}},i=b.current.isEnter;"boolean"!=typeof n&&(n=!i),n?i||a(e?r?0:1:2):i&&a(t?o?3:4:s(h))},[y,p,e,t,r,o,k,w,h]);return(0,a.useEffect)(()=>()=>clearTimeout(v.current),[]),[f,C,y]};var h=r(7084),p=r(97324),f=r(1153);let x=e=>{var t=(0,o._T)(e,[]);return a.createElement("svg",Object.assign({},t,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),a.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),a.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=r(26898);let v={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"}},k=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,f.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,f.bM)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,f.bM)(t,b.K.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,f.bM)(t,b.K.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,f.bM)(t,b.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,f.bM)(t,b.K.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,f.bM)(t,b.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,f.bM)(t,b.K.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,f.bM)("transparent").bgColor,hoverBgColor:t?(0,p.q)((0,f.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,f.bM)(t,b.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,f.bM)(t,b.K.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,f.bM)(t,b.K.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,f.bM)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},y=(0,f.fn)("Button"),C=e=>{let{loading:t,iconSize:r,iconPosition:o,Icon:n,needMargin:i,transitionStatus:l}=e,s=i?o===h.zS.Left?(0,p.q)("-ml-1","mr-1.5"):(0,p.q)("-mr-1","ml-1.5"):"",d=(0,p.q)("w-0 h-0"),c={default:d,entering:d,entered:r,exiting:r,exited:d};return t?a.createElement(x,{className:(0,p.q)(y("icon"),"animate-spin shrink-0",s,c.default,c[l]),style:{transition:"width 150ms"}}):a.createElement(n,{className:(0,p.q)(y("icon"),"shrink-0",r,s)})},_=a.forwardRef((e,t)=>{let{icon:r,iconPosition:i=h.zS.Left,size:l=h.u8.SM,color:s,variant:d="primary",disabled:c,loading:u=!1,loadingText:m,children:x,tooltip:b,className:_}=e,E=(0,o._T)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),N=u||c,j=void 0!==r||u,S=u&&m,T=!(!x&&!S),z=(0,p.q)(v[l].height,v[l].width),M="light"!==d?(0,p.q)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",B=w(d,s),L=k(d)[l],{tooltipProps:R,getReferenceProps:Z}=(0,n.l)(300),[P,q]=g({timeout:50});return(0,a.useEffect)(()=>{q(u)},[u]),a.createElement("button",Object.assign({ref:(0,f.lq)([t,R.refs.setReference]),className:(0,p.q)(y("root"),"flex-shrink-0 inline-flex justify-center items-center group font-medium outline-none",M,L.paddingX,L.paddingY,L.fontSize,B.textColor,B.bgColor,B.borderColor,B.hoverBorderColor,N?"opacity-50 cursor-not-allowed":(0,p.q)(w(d,s).hoverTextColor,w(d,s).hoverBgColor,w(d,s).hoverBorderColor),_),disabled:N},Z,E),a.createElement(n.Z,Object.assign({text:b},R)),j&&i!==h.zS.Right?a.createElement(C,{loading:u,iconSize:z,iconPosition:i,Icon:r,transitionStatus:P.status,needMargin:T}):null,S||x?a.createElement("span",{className:(0,p.q)(y("text"),"text-tremor-default whitespace-nowrap")},S?m:x):null,j&&i===h.zS.Right?a.createElement(C,{loading:u,iconSize:z,iconPosition:i,Icon:r,transitionStatus:P.status,needMargin:T}):null)});_.displayName="Button"},12514:function(e,t,r){"use strict";r.d(t,{Z:function(){return u}});var o=r(5853),n=r(2265),a=r(7084),i=r(26898),l=r(97324),s=r(1153);let d=(0,s.fn)("Card"),c=e=>{if(!e)return"";switch(e){case a.zS.Left:return"border-l-4";case a.m.Top:return"border-t-4";case a.zS.Right:return"border-r-4";case a.m.Bottom:return"border-b-4";default:return""}},u=n.forwardRef((e,t)=>{let{decoration:r="",decorationColor:a,children:u,className:m}=e,g=(0,o._T)(e,["decoration","decorationColor","children","className"]);return n.createElement("div",Object.assign({ref:t,className:(0,l.q)(d("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",a?(0,s.bM)(a,i.K.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",c(r),m)},g),u)});u.displayName="Card"},84264:function(e,t,r){"use strict";r.d(t,{Z:function(){return l}});var o=r(26898),n=r(97324),a=r(1153),i=r(2265);let l=i.forwardRef((e,t)=>{let{color:r,className:l,children:s}=e;return i.createElement("p",{ref:t,className:(0,n.q)("text-tremor-default",r?(0,a.bM)(r,o.K.text).textColor:(0,n.q)("text-tremor-content","dark:text-dark-tremor-content"),l)},s)});l.displayName="Text"},96761:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var o=r(5853),n=r(26898),a=r(97324),i=r(1153),l=r(2265);let s=l.forwardRef((e,t)=>{let{color:r,children:s,className:d}=e,c=(0,o._T)(e,["color","children","className"]);return l.createElement("p",Object.assign({ref:t,className:(0,a.q)("font-medium text-tremor-title",r?(0,i.bM)(r,n.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",d)},c),s)});s.displayName="Title"},19046:function(e,t,r){"use strict";r.d(t,{Dx:function(){return l.Z},Zb:function(){return n.Z},oi:function(){return i.Z},xv:function(){return a.Z},zx:function(){return o.Z}});var o=r(20831),n=r(12514),a=r(84264),i=r(49566),l=r(96761)},80443:function(e,t,r){"use strict";var o=r(2265),n=r(99376),a=r(14474),i=r(3914);t.Z=()=>{var e,t,r,l,s,d,c;let u=(0,n.useRouter)(),m="undefined"!=typeof document?(0,i.e)("token"):null;(0,o.useEffect)(()=>{m||u.replace("/sso/key/generate")},[m,u]);let g=(0,o.useMemo)(()=>{if(!m)return null;try{return(0,a.o)(m)}catch(e){return(0,i.b)(),u.replace("/sso/key/generate"),null}},[m,u]);return{token:m,accessToken:null!==(e=null==g?void 0:g.key)&&void 0!==e?e:null,userId:null!==(t=null==g?void 0:g.user_id)&&void 0!==t?t:null,userEmail:null!==(r=null==g?void 0:g.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==g?void 0:g.user_role)&&void 0!==l?l:null),premiumUser:null!==(s=null==g?void 0:g.premium_user)&&void 0!==s?s:null,disabledPersonalKeyCreation:null!==(d=null==g?void 0:g.disabled_non_admin_personal_key_creation)&&void 0!==d?d:null,showSSOBanner:(null==g?void 0:g.login_method)==="username_password"}}},8719:function(e,t,r){"use strict";r.r(t);var o=r(57437),n=r(5183),a=r(80443);t.default=()=>{let{userId:e,userRole:t,accessToken:r}=(0,a.Z)();return(0,o.jsx)(n.Z,{userID:e,userRole:t,accessToken:r})}},5183:function(e,t,r){"use strict";var o=r(57437),n=r(2265),a=r(19046),i=r(69734),l=r(19250),s=r(9114);t.Z=e=>{let{userID:t,userRole:r,accessToken:d}=e,{logoUrl:c,setLogoUrl:u}=(0,i.F)(),[m,g]=(0,n.useState)(""),[h,p]=(0,n.useState)(!1);(0,n.useEffect)(()=>{d&&f()},[d]);let f=async()=>{try{let t=(0,l.getProxyBaseUrl)(),r=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{Authorization:"Bearer ".concat(d),"Content-Type":"application/json"}});if(r.ok){var e;let t=await r.json(),o=(null===(e=t.values)||void 0===e?void 0:e.logo_url)||"";g(o),u(o||null)}}catch(e){console.error("Error fetching theme settings:",e)}},x=async()=>{p(!0);try{let e=(0,l.getProxyBaseUrl)();if((await fetch(e?"".concat(e,"/update/ui_theme_settings"):"/update/ui_theme_settings",{method:"PATCH",headers:{Authorization:"Bearer ".concat(d),"Content-Type":"application/json"},body:JSON.stringify({logo_url:m||null})})).ok)s.Z.success("Logo settings updated successfully!"),u(m||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating logo settings:",e),s.Z.fromBackend("Failed to update logo settings")}finally{p(!1)}},b=async()=>{g(""),u(null),p(!0);try{let e=(0,l.getProxyBaseUrl)();if((await fetch(e?"".concat(e,"/update/ui_theme_settings"):"/update/ui_theme_settings",{method:"PATCH",headers:{Authorization:"Bearer ".concat(d),"Content-Type":"application/json"},body:JSON.stringify({logo_url:null})})).ok)s.Z.success("Logo reset to default!");else throw Error("Failed to reset logo")}catch(e){console.error("Error resetting logo:",e),s.Z.fromBackend("Failed to reset logo")}finally{p(!1)}};return d?(0,o.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,o.jsxs)("div",{className:"mb-8",children:[(0,o.jsx)(a.Dx,{className:"text-2xl font-bold mb-2",children:"Logo Customization"}),(0,o.jsx)(a.xv,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo."})]}),(0,o.jsx)(a.Zb,{className:"shadow-sm p-6",children:(0,o.jsxs)("div",{className:"space-y-6",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(a.xv,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,o.jsx)(a.oi,{placeholder:"https://example.com/logo.png",value:m,onValueChange:e=>{g(e),u(e||null)},className:"w-full"}),(0,o.jsx)(a.xv,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty to use the default LiteLLM logo"})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(a.xv,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Current Logo"}),(0,o.jsx)("div",{className:"bg-gray-50 rounded-lg p-6 flex items-center justify-center min-h-[120px]",children:m?(0,o.jsx)("img",{src:m,alt:"Custom logo",className:"max-w-full max-h-24 object-contain",onError:e=>{var t;let r=e.target;r.style.display="none";let o=document.createElement("div");o.className="text-gray-500 text-sm",o.textContent="Failed to load image",null===(t=r.parentElement)||void 0===t||t.appendChild(o)}}):(0,o.jsx)(a.xv,{className:"text-gray-500 text-sm",children:"Default LiteLLM logo will be used"})})]}),(0,o.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,o.jsx)(a.zx,{onClick:x,loading:h,disabled:h,color:"indigo",children:"Save Changes"}),(0,o.jsx)(a.zx,{onClick:b,loading:h,disabled:h,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}},69734:function(e,t,r){"use strict";r.d(t,{F:function(){return l},f:function(){return s}});var o=r(57437),n=r(2265),a=r(19250);let i=(0,n.createContext)(void 0),l=()=>{let e=(0,n.useContext)(i);if(!e)throw Error("useTheme must be used within a ThemeProvider");return e},s=e=>{let{children:t,accessToken:r}=e,[l,s]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(async()=>{try{let t=(0,a.getProxyBaseUrl)(),r=await fetch(t?"".concat(t,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{"Content-Type":"application/json"}});if(r.ok){var e;let t=await r.json();(null===(e=t.values)||void 0===e?void 0:e.logo_url)&&s(t.values.logo_url)}}catch(e){console.warn("Failed to load logo settings from backend:",e)}})()},[]),(0,o.jsx)(i.Provider,{value:{logoUrl:l,setLogoUrl:s},children:t})}},14474:function(e,t,r){"use strict";r.d(t,{o:function(){return n}});class o extends Error{}function n(e,t){let r;if("string"!=typeof e)throw new o("Invalid token specified: must be a string");t||(t={});let n=!0===t.header?0:1,a=e.split(".")[n];if("string"!=typeof a)throw new o(`Invalid token specified: missing part #${n+1}`);try{r=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 r;return r=t,decodeURIComponent(atob(r).replace(/(.)/g,(e,t)=>{let r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}catch(e){return atob(t)}}(a)}catch(e){throw new o(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(r)}catch(e){throw new o(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}o.prototype.name="InvalidTokenError"}},function(e){e.O(0,[1114,1491,4556,8049,2971,2117,1744],function(){return e(e.s=46034)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/teams/page-77a91fcf970152d7.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/teams/page-3be10e89c819961e.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/teams/page-77a91fcf970152d7.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/teams/page-3be10e89c819961e.js index 5530d1850cb..21517105f4a 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/teams/page-77a91fcf970152d7.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/teams/page-3be10e89c819961e.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9483],{77403:function(e,s,l){Promise.resolve().then(l.bind(l,67578))},40728:function(e,s,l){"use strict";l.d(s,{C:function(){return a.Z},x:function(){return t.Z}});var a=l(41649),t=l(84264)},88913:function(e,s,l){"use strict";l.d(s,{Dx:function(){return c.Z},Zb:function(){return t.Z},iz:function(){return r.Z},oi:function(){return n.Z},xv:function(){return i.Z},zx:function(){return a.Z}});var a=l(20831),t=l(12514),r=l(67982),i=l(84264),n=l(49566),c=l(96761)},25512:function(e,s,l){"use strict";l.d(s,{P:function(){return a.Z},Q:function(){return t.Z}});var a=l(27281),t=l(57365)},67578:function(e,s,l){"use strict";l.r(s),l.d(s,{default:function(){return ej}});var a=l(57437),t=l(2265),r=l(19250),i=l(39210),n=l(13634),c=l(33293),o=l(88904),d=l(20347),m=l(20831),x=l(12514),u=l(49804),h=l(67101),g=l(29706),p=l(84264),j=l(918),f=l(59872),b=l(47323),v=l(12485),y=l(18135),_=l(35242),N=l(77991),w=l(23628),Z=e=>{let{lastRefreshed:s,onRefresh:l,userRole:t,children:r}=e;return(0,a.jsxs)(y.Z,{className:"gap-2 h-[75vh] w-full",children:[(0,a.jsxs)(_.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)(v.Z,{children:"Your Teams"}),(0,a.jsx)(v.Z,{children:"Available Teams"}),(0,d.tY)(t||"")&&(0,a.jsx)(v.Z,{children:"Default Team Settings"})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,a.jsxs)(p.Z,{children:["Last Refreshed: ",s]}),(0,a.jsx)(b.Z,{icon:w.Z,variant:"shadow",size:"xs",className:"self-center",onClick:l})]})]}),(0,a.jsx)(N.Z,{children:r})]})},C=l(25512),S=e=>{let{filters:s,organizations:l,showFilters:t,onToggleFilters:r,onChange:i,onReset:n}=e;return(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("div",{className:"relative w-64",children:[(0,a.jsx)("input",{type:"text",placeholder:"Search by Team Name...",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:s.team_alias,onChange:e=>i("team_alias",e.target.value)}),(0,a.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,a.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,a.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ".concat(t?"bg-gray-100":""),onClick:()=>r(!t),children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.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"})}),"Filters",(s.team_id||s.team_alias||s.organization_id)&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-blue-500"})]}),(0,a.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:n,children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.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"})}),"Reset Filters"]})]}),t&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,a.jsxs)("div",{className:"relative w-64",children:[(0,a.jsx)("input",{type:"text",placeholder:"Enter Team 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:s.team_id,onChange:e=>i("team_id",e.target.value)}),(0,a.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,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),(0,a.jsx)("div",{className:"w-64",children:(0,a.jsx)(C.P,{value:s.organization_id||"",onValueChange:e=>i("organization_id",e),placeholder:"Select Organization",children:null==l?void 0:l.map(e=>(0,a.jsx)(C.Q,{value:e.organization_id||"",children:e.organization_alias||e.organization_id},e.organization_id))})})]})]})},k=l(39760),T=e=>{let{currentOrg:s,setTeams:l}=e,[a,r]=(0,t.useState)(""),{accessToken:n,userId:c,userRole:o}=(0,k.Z)(),d=(0,t.useCallback)(()=>{r(new Date().toLocaleString())},[]);return(0,t.useEffect)(()=>{n&&(0,i.Z)(n,c,o,s,l).then(),d()},[n,s,a,d,l,c,o]),{lastRefreshed:a,setLastRefreshed:r,onRefreshClick:d}},M=l(21626),z=l(97214),A=l(28241),E=l(58834),D=l(69552),F=l(71876),L=l(89970),P=l(53410),O=l(74998),I=l(41649),V=l(86462),R=l(47686),B=l(46468),W=e=>{let{team:s}=e,[l,r]=(0,t.useState)(!1);return(0,a.jsx)(A.Z,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:s.models.length>3?"px-0":"",children:(0,a.jsx)("div",{className:"flex flex-col",children:Array.isArray(s.models)?(0,a.jsx)("div",{className:"flex flex-col",children:0===s.models.length?(0,a.jsx)(I.Z,{size:"xs",className:"mb-1",color:"red",children:(0,a.jsx)(p.Z,{children:"All Proxy Models"})}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex items-start",children:[s.models.length>3&&(0,a.jsx)("div",{children:(0,a.jsx)(b.Z,{icon:l?V.Z:R.Z,className:"cursor-pointer",size:"xs",onClick:()=>{r(e=>!e)}})}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[s.models.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,a.jsx)(I.Z,{size:"xs",color:"red",children:(0,a.jsx)(p.Z,{children:"All Proxy Models"})},s):(0,a.jsx)(I.Z,{size:"xs",color:"blue",children:(0,a.jsx)(p.Z,{children:e.length>30?"".concat((0,B.W0)(e).slice(0,30),"..."):(0,B.W0)(e)})},s)),s.models.length>3&&!l&&(0,a.jsx)(I.Z,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,a.jsxs)(p.Z,{children:["+",s.models.length-3," ",s.models.length-3==1?"more model":"more models"]})}),l&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:s.models.slice(3).map((e,s)=>"all-proxy-models"===e?(0,a.jsx)(I.Z,{size:"xs",color:"red",children:(0,a.jsx)(p.Z,{children:"All Proxy Models"})},s+3):(0,a.jsx)(I.Z,{size:"xs",color:"blue",children:(0,a.jsx)(p.Z,{children:e.length>30?"".concat((0,B.W0)(e).slice(0,30),"..."):(0,B.W0)(e)})},s+3))})]})]})})}):null})})},U=l(88906),G=l(92369),J=e=>{let s="inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border";return"admin"===e?(0,a.jsxs)("span",{className:s,style:{backgroundColor:"#EEF2FF",color:"#3730A3",borderColor:"#C7D2FE"},children:[(0,a.jsx)(U.Z,{className:"h-3 w-3 mr-1"}),"Admin"]}):(0,a.jsxs)("span",{className:s,style:{backgroundColor:"#F3F4F6",color:"#4B5563",borderColor:"#E5E7EB"},children:[(0,a.jsx)(G.Z,{className:"h-3 w-3 mr-1"}),"Member"]})};let Q=(e,s)=>{var l,a;if(!s)return null;let t=null===(l=e.members_with_roles)||void 0===l?void 0:l.find(e=>e.user_id===s);return null!==(a=null==t?void 0:t.role)&&void 0!==a?a:null};var q=e=>{let{team:s,userId:l}=e,t=J(Q(s,l));return(0,a.jsx)(A.Z,{children:t})},K=e=>{let{teams:s,currentOrg:l,setSelectedTeamId:t,perTeamInfo:r,userRole:i,userId:n,setEditTeam:c,onDeleteTeam:o}=e;return(0,a.jsxs)(M.Z,{children:[(0,a.jsx)(E.Z,{children:(0,a.jsxs)(F.Z,{children:[(0,a.jsx)(D.Z,{children:"Team Name"}),(0,a.jsx)(D.Z,{children:"Team ID"}),(0,a.jsx)(D.Z,{children:"Created"}),(0,a.jsx)(D.Z,{children:"Spend (USD)"}),(0,a.jsx)(D.Z,{children:"Budget (USD)"}),(0,a.jsx)(D.Z,{children:"Models"}),(0,a.jsx)(D.Z,{children:"Organization"}),(0,a.jsx)(D.Z,{children:"Your Role"}),(0,a.jsx)(D.Z,{children:"Info"})]})}),(0,a.jsx)(z.Z,{children:s&&s.length>0?s.filter(e=>!l||e.organization_id===l.organization_id).sort((e,s)=>new Date(s.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,a.jsxs)(F.Z,{children:[(0,a.jsx)(A.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,a.jsx)(A.Z,{children:(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(L.Z,{title:e.team_id,children:(0,a.jsxs)(m.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:()=>{t(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,a.jsx)(A.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,a.jsx)(A.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:(0,f.pw)(e.spend,4)}),(0,a.jsx)(A.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,a.jsx)(W,{team:e}),(0,a.jsx)(A.Z,{children:e.organization_id}),(0,a.jsx)(q,{team:e,userId:n}),(0,a.jsxs)(A.Z,{children:[(0,a.jsxs)(p.Z,{children:[r&&e.team_id&&r[e.team_id]&&r[e.team_id].keys&&r[e.team_id].keys.length," ","Keys"]}),(0,a.jsxs)(p.Z,{children:[r&&e.team_id&&r[e.team_id]&&r[e.team_id].team_info&&r[e.team_id].team_info.members_with_roles&&r[e.team_id].team_info.members_with_roles.length," ","Members"]})]}),(0,a.jsx)(A.Z,{children:"Admin"==i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Z,{icon:P.Z,size:"sm",onClick:()=>{t(e.team_id),c(!0)}}),(0,a.jsx)(b.Z,{onClick:()=>o(e.team_id),icon:O.Z,size:"sm"})]}):null})]},e.team_id)):null})]})},X=l(32489),Y=l(76865),H=e=>{var s;let{teams:l,teamToDelete:r,onCancel:i,onConfirm:n}=e,[c,o]=(0,t.useState)(""),d=null==l?void 0:l.find(e=>e.team_id===r),m=(null==d?void 0:d.team_alias)||"",x=(null==d?void 0:null===(s=d.keys)||void 0===s?void 0:s.length)||0,u=c===m;return(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl min-h-[380px] py-6 overflow-hidden transform transition-all flex flex-col justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Delete Team"}),(0,a.jsx)("button",{onClick:()=>{i(),o("")},className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:(0,a.jsx)(X.Z,{size:20})})]}),(0,a.jsxs)("div",{className:"px-6 py-4",children:[x>0&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,a.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,a.jsx)(Y.Z,{size:20})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-base font-medium text-red-600",children:["Warning: This team has ",x," associated key",x>1?"s":"","."]}),(0,a.jsx)("p",{className:"text-base text-red-600 mt-2",children:"Deleting the team will also delete all associated keys. This action is irreversible."})]})]}),(0,a.jsx)("p",{className:"text-base text-gray-600 mb-5",children:"Are you sure you want to force delete this team and all its keys?"}),(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,a.jsx)("span",{className:"underline",children:m})," to confirm deletion:"]}),(0,a.jsx)("input",{type:"text",value:c,onChange:e=>o(e.target.value),placeholder:"Enter team name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]})]})]}),(0,a.jsxs)("div",{className:"px-6 py-4 bg-gray-50 flex justify-end gap-4",children:[(0,a.jsx)("button",{onClick:()=>{i(),o("")},className:"px-5 py-3 bg-white border border-gray-300 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Cancel"}),(0,a.jsx)("button",{onClick:n,disabled:!u,className:"px-5 py-3 rounded-md text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 ".concat(u?"bg-red-600 hover:bg-red-700":"bg-red-300 cursor-not-allowed"),children:"Force Delete"})]})]})})},$=l(82680),ee=l(52787),es=l(64482),el=l(73002),ea=l(26210),et=l(15424),er=l(24199),ei=l(97415),en=l(95920),ec=l(2597),eo=l(51750),ed=l(9114),em=l(68473);let ex=(e,s)=>{let l=[];return e&&e.models.length>0?(console.log("organization.models: ".concat(e.models)),l=e.models):l=s,(0,B.Ob)(l,s)};var eu=e=>{let{isTeamModalVisible:s,handleOk:l,handleCancel:i,currentOrg:c,organizations:o,teams:d,setTeams:m,modelAliases:x,setModelAliases:u,loggingSettings:h,setLoggingSettings:g,setIsTeamModalVisible:p}=e,{userId:j,userRole:f,accessToken:b,premiumUser:v}=(0,k.Z)(),[y]=n.Z.useForm(),[_,N]=(0,t.useState)([]),[w,Z]=(0,t.useState)(null),[C,S]=(0,t.useState)([]),[T,M]=(0,t.useState)([]),[z,A]=(0,t.useState)([]),[E,D]=(0,t.useState)(!1);(0,t.useEffect)(()=>{(async()=>{try{if(null===j||null===f||null===b)return;let e=await (0,B.K2)(j,f,b);e&&N(e)}catch(e){console.error("Error fetching user models:",e)}})()},[b,j,f,d]),(0,t.useEffect)(()=>{console.log("currentOrgForCreateTeam: ".concat(w));let e=ex(w,_);console.log("models: ".concat(e)),S(e),y.setFieldValue("models",[])},[w,_,y]);let F=async()=>{try{if(null==b)return;let e=await (0,r.fetchMCPAccessGroups)(b);A(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,t.useEffect)(()=>{F()},[b,F]),(0,t.useEffect)(()=>{(async()=>{try{if(null==b)return;let e=(await (0,r.getGuardrailsList)(b)).guardrails.map(e=>e.guardrail_name);M(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[b]);let P=async e=>{try{if(console.log("formValues: ".concat(JSON.stringify(e))),null!=b){var s,l,a;let t=null==e?void 0:e.team_alias,i=null!==(a=null==d?void 0:d.map(e=>e.team_alias))&&void 0!==a?a:[],n=(null==e?void 0:e.organization_id)||(null==c?void 0:c.organization_id);if(""===n||"string"!=typeof n?e.organization_id=null:e.organization_id=n.trim(),i.includes(t))throw Error("Team alias ".concat(t," already exists, please pick another alias"));if(ed.Z.info("Creating Team"),h.length>0){let s={};if(e.metadata)try{s=JSON.parse(e.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}s={...s,logging:h.filter(e=>e.callback_name)},e.metadata=JSON.stringify(s)}if(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||e.allowed_mcp_servers_and_groups&&((null===(s=e.allowed_mcp_servers_and_groups.servers)||void 0===s?void 0:s.length)>0||(null===(l=e.allowed_mcp_servers_and_groups.accessGroups)||void 0===l?void 0:l.length)>0||e.allowed_mcp_servers_and_groups.toolPermissions)){if(e.object_permission={},e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission.vector_stores=e.allowed_vector_store_ids,delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups){let{servers:s,accessGroups:l}=e.allowed_mcp_servers_and_groups;s&&s.length>0&&(e.object_permission.mcp_servers=s),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),delete e.allowed_mcp_servers_and_groups}e.mcp_tool_permissions&&Object.keys(e.mcp_tool_permissions).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=e.mcp_tool_permissions,delete e.mcp_tool_permissions)}e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),Object.keys(x).length>0&&(e.model_aliases=x);let o=await (0,r.teamCreateCall)(b,e);null!==d?m([...d,o]):m([o]),console.log("response for team create call: ".concat(o)),ed.Z.success("Team created"),y.resetFields(),g([]),u({}),p(!1)}}catch(e){console.error("Error creating the team:",e),ed.Z.fromBackend("Error creating the team: "+e)}};return(0,a.jsx)($.Z,{title:"Create Team",open:s,width:1e3,footer:null,onOk:l,onCancel:i,children:(0,a.jsxs)(n.Z,{form:y,onFinish:P,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,a.jsx)(ea.oi,{placeholder:""})}),(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Organization"," ",(0,a.jsx)(L.Z,{title:(0,a.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,a.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,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:c?c.organization_id:null,className:"mt-8",children:(0,a.jsx)(ee.default,{showSearch:!0,allowClear:!0,placeholder:"Search or select an Organization",onChange:e=>{y.setFieldValue("organization_id",e),Z((null==o?void 0:o.find(s=>s.organization_id===e))||null)},filterOption:(e,s)=>{var l;return!!s&&((null===(l=s.children)||void 0===l?void 0:l.toString())||"").toLowerCase().includes(e.toLowerCase())},optionFilterProp:"children",children:null==o?void 0:o.map(e=>(0,a.jsxs)(ee.default.Option,{value:e.organization_id,children:[(0,a.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,a.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Models"," ",(0,a.jsx)(L.Z,{title:"These are the models that your selected team has access to",children:(0,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,a.jsxs)(ee.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,a.jsx)(ee.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),C.map(e=>(0,a.jsx)(ee.default.Option,{value:e,children:(0,B.W0)(e)},e))]})}),(0,a.jsx)(n.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,a.jsx)(er.Z,{step:.01,precision:2,width:200})}),(0,a.jsx)(n.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,a.jsxs)(ee.default,{defaultValue:null,placeholder:"n/a",children:[(0,a.jsx)(ee.default.Option,{value:"24h",children:"daily"}),(0,a.jsx)(ee.default.Option,{value:"7d",children:"weekly"}),(0,a.jsx)(ee.default.Option,{value:"30d",children:"monthly"})]})}),(0,a.jsx)(n.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,a.jsx)(er.Z,{step:1,width:400})}),(0,a.jsx)(n.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,a.jsx)(er.Z,{step:1,width:400})}),(0,a.jsxs)(ea.UQ,{className:"mt-20 mb-8",onClick:()=>{E||(F(),D(!0))},children:[(0,a.jsx)(ea._m,{children:(0,a.jsx)("b",{children:"Additional Settings"})}),(0,a.jsxs)(ea.X1,{children:[(0,a.jsx)(n.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,a.jsx)(ea.oi,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,a.jsx)(n.Z.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,a.jsx)(er.Z,{step:.01,precision:2,width:200})}),(0,a.jsx)(n.Z.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,a.jsx)(ea.oi,{placeholder:"e.g., 30d"})}),(0,a.jsx)(n.Z.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,a.jsx)(er.Z,{step:1,width:400})}),(0,a.jsx)(n.Z.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,a.jsx)(er.Z,{step:1,width:400})}),(0,a.jsx)(n.Z.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,a.jsx)(es.default.TextArea,{rows:4})}),(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Guardrails"," ",(0,a.jsx)(L.Z,{title:"Setup your first guardrail",children:(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,a.jsx)(ee.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:T.map(e=>({value:e,label:e}))})}),(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,a.jsx)(L.Z,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,a.jsx)(ei.Z,{onChange:e=>y.setFieldValue("allowed_vector_store_ids",e),value:y.getFieldValue("allowed_vector_store_ids"),accessToken:b||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,a.jsxs)(ea.UQ,{className:"mt-8 mb-8",children:[(0,a.jsx)(ea._m,{children:(0,a.jsx)("b",{children:"MCP Settings"})}),(0,a.jsxs)(ea.X1,{children:[(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,a.jsx)(L.Z,{title:"Select which MCP servers or access groups this team can access",children:(0,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,a.jsx)(en.Z,{onChange:e=>y.setFieldValue("allowed_mcp_servers_and_groups",e),value:y.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:b||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,a.jsx)(n.Z.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,a.jsx)(es.default,{type:"hidden"})}),(0,a.jsx)(n.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_mcp_servers_and_groups!==s.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>{var e;return(0,a.jsx)("div",{className:"mt-6",children:(0,a.jsx)(em.Z,{accessToken:b||"",selectedServers:(null===(e=y.getFieldValue("allowed_mcp_servers_and_groups"))||void 0===e?void 0:e.servers)||[],toolPermissions:y.getFieldValue("mcp_tool_permissions")||{},onChange:e=>y.setFieldsValue({mcp_tool_permissions:e})})})}})]})]}),(0,a.jsxs)(ea.UQ,{className:"mt-8 mb-8",children:[(0,a.jsx)(ea._m,{children:(0,a.jsx)("b",{children:"Logging Settings"})}),(0,a.jsx)(ea.X1,{children:(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(ec.Z,{value:h,onChange:g,premiumUser:v})})})]}),(0,a.jsxs)(ea.UQ,{className:"mt-8 mb-8",children:[(0,a.jsx)(ea._m,{children:(0,a.jsx)("b",{children:"Model Aliases"})}),(0,a.jsx)(ea.X1,{children:(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)(ea.xv,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,a.jsx)(eo.Z,{accessToken:b||"",initialModelAliases:x,onAliasUpdate:u,showExampleConfig:!1})]})})]})]}),(0,a.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,a.jsx)(el.ZP,{htmlType:"submit",children:"Create Team"})})]})})},eh=e=>{let{teams:s,accessToken:l,setTeams:b,userID:v,userRole:y,organizations:_,premiumUser:N=!1}=e,[w,C]=(0,t.useState)(null),[k,M]=(0,t.useState)(!1),[z,A]=(0,t.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),[E]=n.Z.useForm(),[D]=n.Z.useForm(),[F,L]=(0,t.useState)(null),[P,O]=(0,t.useState)(!1),[I,V]=(0,t.useState)(!1),[R,B]=(0,t.useState)(!1),[W,U]=(0,t.useState)(!1),[G,J]=(0,t.useState)([]),[Q,q]=(0,t.useState)(!1),[X,Y]=(0,t.useState)(null),[$,ee]=(0,t.useState)({}),[es,el]=(0,t.useState)([]),[ea,et]=(0,t.useState)({}),{lastRefreshed:er,onRefreshClick:ei}=T({currentOrg:w,setTeams:b});(0,t.useEffect)(()=>{s&&ee(s.reduce((e,s)=>(e[s.team_id]={keys:s.keys||[],team_info:{members_with_roles:s.members_with_roles||[]}},e),{}))},[s]);let en=async e=>{Y(e),q(!0)},ec=async()=>{if(null!=X&&null!=s&&null!=l){try{await (0,r.teamDeleteCall)(l,X),(0,i.Z)(l,v,y,w,b)}catch(e){console.error("Error deleting the team:",e)}q(!1),Y(null)}};return(0,a.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,a.jsx)(h.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,a.jsxs)(u.Z,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"==y||"Org Admin"==y)&&(0,a.jsx)(m.Z,{className:"w-fit",onClick:()=>V(!0),children:"+ Create New Team"}),F?(0,a.jsx)(c.Z,{teamId:F,onUpdate:e=>{b(s=>{if(null==s)return s;let a=s.map(s=>e.team_id===s.team_id?(0,f.nl)(s,e):s);return l&&(0,i.Z)(l,v,y,w,b),a})},onClose:()=>{L(null),O(!1)},accessToken:l,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let s=0;se.team_id===F)),is_proxy_admin:"Admin"==y,userModels:G,editTeam:P}):(0,a.jsxs)(Z,{lastRefreshed:er,onRefresh:ei,userRole:y,children:[(0,a.jsxs)(g.Z,{children:[(0,a.jsxs)(p.Z,{children:["Click on “Team ID” to view team details ",(0,a.jsx)("b",{children:"and"})," manage team members."]}),(0,a.jsx)(h.Z,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,a.jsx)(u.Z,{numColSpan:1,children:(0,a.jsxs)(x.Z,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,a.jsx)("div",{className:"border-b px-6 py-4",children:(0,a.jsx)("div",{className:"flex flex-col space-y-4",children:(0,a.jsx)(S,{filters:z,organizations:_,showFilters:k,onToggleFilters:M,onChange:(e,s)=>{let a={...z,[e]:s};A(a),l&&(0,r.v2TeamListCall)(l,a.organization_id||null,null,a.team_id||null,a.team_alias||null).then(e=>{e&&e.teams&&b(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})},onReset:()=>{A({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),l&&(0,r.v2TeamListCall)(l,null,v||null,null,null).then(e=>{e&&e.teams&&b(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})}})})}),(0,a.jsx)(K,{teams:s,currentOrg:w,perTeamInfo:$,userRole:y,userId:v,setSelectedTeamId:L,setEditTeam:O,onDeleteTeam:en}),Q&&(0,a.jsx)(H,{teams:s,teamToDelete:X,onCancel:()=>{q(!1),Y(null)},onConfirm:ec})]})})})]}),(0,a.jsx)(g.Z,{children:(0,a.jsx)(j.Z,{accessToken:l,userID:v})}),(0,d.tY)(y||"")&&(0,a.jsx)(g.Z,{children:(0,a.jsx)(o.Z,{accessToken:l,userID:v||"",userRole:y||""})})]}),("Admin"==y||"Org Admin"==y)&&(0,a.jsx)(eu,{isTeamModalVisible:I,handleOk:()=>{V(!1),E.resetFields(),el([]),et({})},handleCancel:()=>{V(!1),E.resetFields(),el([]),et({})},currentOrg:w,organizations:_,teams:s,setTeams:b,modelAliases:ea,setModelAliases:et,loggingSettings:es,setLoggingSettings:el,setIsTeamModalVisible:V})]})})})},eg=l(11318),ep=l(22004),ej=()=>{let{accessToken:e,userId:s,userRole:l}=(0,k.Z)(),{teams:r,setTeams:i}=(0,eg.Z)(),[n,c]=(0,t.useState)([]);return(0,t.useEffect)(()=>{(0,ep.g)(e,c).then(()=>{})},[e]),(0,a.jsx)(eh,{teams:r,accessToken:e,setTeams:i,userID:s,userRole:l,organizations:n})}},88904:function(e,s,l){"use strict";var a=l(57437),t=l(2265),r=l(88913),i=l(93192),n=l(52787),c=l(63709),o=l(87908),d=l(19250),m=l(65925),x=l(46468),u=l(9114);s.Z=e=>{var s;let{accessToken:l,userID:h,userRole:g}=e,[p,j]=(0,t.useState)(!0),[f,b]=(0,t.useState)(null),[v,y]=(0,t.useState)(!1),[_,N]=(0,t.useState)({}),[w,Z]=(0,t.useState)(!1),[C,S]=(0,t.useState)([]),{Paragraph:k}=i.default,{Option:T}=n.default;(0,t.useEffect)(()=>{(async()=>{if(!l){j(!1);return}try{let e=await (0,d.getDefaultTeamSettings)(l);if(b(e),N(e.values||{}),l)try{let e=await (0,d.modelAvailableCall)(l,h,g);if(e&&e.data){let s=e.data.map(e=>e.id);S(s)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching team SSO settings:",e),u.Z.fromBackend("Failed to fetch team settings")}finally{j(!1)}})()},[l]);let M=async()=>{if(l){Z(!0);try{let e=await (0,d.updateDefaultTeamSettings)(l,_);b({...f,values:e.settings}),y(!1),u.Z.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),u.Z.fromBackend("Failed to update team settings")}finally{Z(!1)}}},z=(e,s)=>{N(l=>({...l,[e]:s}))},A=(e,s,l)=>{var t;let i=s.type;return"budget_duration"===e?(0,a.jsx)(m.Z,{value:_[e]||null,onChange:s=>z(e,s),className:"mt-2"}):"boolean"===i?(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(c.Z,{checked:!!_[e],onChange:s=>z(e,s)})}):"array"===i&&(null===(t=s.items)||void 0===t?void 0:t.enum)?(0,a.jsx)(n.default,{mode:"multiple",style:{width:"100%"},value:_[e]||[],onChange:s=>z(e,s),className:"mt-2",children:s.items.enum.map(e=>(0,a.jsx)(T,{value:e,children:e},e))}):"models"===e?(0,a.jsx)(n.default,{mode:"multiple",style:{width:"100%"},value:_[e]||[],onChange:s=>z(e,s),className:"mt-2",children:C.map(e=>(0,a.jsx)(T,{value:e,children:(0,x.W0)(e)},e))}):"string"===i&&s.enum?(0,a.jsx)(n.default,{style:{width:"100%"},value:_[e]||"",onChange:s=>z(e,s),className:"mt-2",children:s.enum.map(e=>(0,a.jsx)(T,{value:e,children:e},e))}):(0,a.jsx)(r.oi,{value:void 0!==_[e]?String(_[e]):"",onChange:s=>z(e,s.target.value),placeholder:s.description||"",className:"mt-2"})},E=(e,s)=>null==s?(0,a.jsx)("span",{className:"text-gray-400",children:"Not set"}):"budget_duration"===e?(0,a.jsx)("span",{children:(0,m.m)(s)}):"boolean"==typeof s?(0,a.jsx)("span",{children:s?"Enabled":"Disabled"}):"models"===e&&Array.isArray(s)?0===s.length?(0,a.jsx)("span",{className:"text-gray-400",children:"None"}):(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,a.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,x.W0)(e)},s))}):"object"==typeof s?Array.isArray(s)?0===s.length?(0,a.jsx)("span",{className:"text-gray-400",children:"None"}):(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,a.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,a.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(s,null,2)}):(0,a.jsx)("span",{children:String(s)});return p?(0,a.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,a.jsx)(o.Z,{size:"large"})}):f?(0,a.jsxs)(r.Zb,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)(r.Dx,{className:"text-xl",children:"Default Team Settings"}),!p&&f&&(v?(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.zx,{variant:"secondary",onClick:()=>{y(!1),N(f.values||{})},disabled:w,children:"Cancel"}),(0,a.jsx)(r.zx,{onClick:M,loading:w,children:"Save Changes"})]}):(0,a.jsx)(r.zx,{onClick:()=>y(!0),children:"Edit Settings"}))]}),(0,a.jsx)(r.xv,{children:"These settings will be applied by default when creating new teams."}),(null==f?void 0:null===(s=f.field_schema)||void 0===s?void 0:s.description)&&(0,a.jsx)(k,{className:"mb-4 mt-2",children:f.field_schema.description}),(0,a.jsx)(r.iz,{}),(0,a.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:s}=f;return s&&s.properties?Object.entries(s.properties).map(s=>{let[l,t]=s,i=e[l],n=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,a.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,a.jsx)(r.xv,{className:"font-medium text-lg",children:n}),(0,a.jsx)(k,{className:"text-sm text-gray-500 mt-1",children:t.description||"No description available"}),v?(0,a.jsx)("div",{className:"mt-2",children:A(l,t,i)}):(0,a.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:E(l,i)})]},l)}):(0,a.jsx)(r.xv,{children:"No schema information available"})})()})]}):(0,a.jsx)(r.Zb,{children:(0,a.jsx)(r.xv,{children:"No team settings available or you do not have permission to view them."})})}},51750:function(e,s,l){"use strict";l.d(s,{Z:function(){return g}});var a=l(57437),t=l(2265),r=l(77355),i=l(93416),n=l(74998),c=l(95704),o=l(56522),d=l(52787),m=l(69993),x=l(51601),u=e=>{let{accessToken:s,value:l,placeholder:r="Select a Model",onChange:i,disabled:n=!1,style:c,className:u,showLabel:h=!0,labelText:g="Select Model"}=e,[p,j]=(0,t.useState)(l),[f,b]=(0,t.useState)(!1),[v,y]=(0,t.useState)([]),_=(0,t.useRef)(null);return(0,t.useEffect)(()=>{j(l)},[l]),(0,t.useEffect)(()=>{s&&(async()=>{try{let e=await (0,x.p)(s);console.log("Fetched models for selector:",e),e.length>0&&y(e)}catch(e){console.error("Error fetching model info:",e)}})()},[s]),(0,a.jsxs)("div",{children:[h&&(0,a.jsxs)(o.x,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(m.Z,{className:"mr-2"})," ",g]}),(0,a.jsx)(d.default,{value:p,placeholder:r,onChange:e=>{"custom"===e?(b(!0),j(void 0)):(b(!1),j(e),i&&i(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,s)=>({value:e,label:e,key:s})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...c},showSearch:!0,className:"rounded-md ".concat(u||""),disabled:n}),f&&(0,a.jsx)(o.o,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{j(e),i&&i(e)},500)},disabled:n})]})},h=l(9114),g=e=>{let{accessToken:s,initialModelAliases:l={},onAliasUpdate:o,showExampleConfig:d=!0}=e,[m,x]=(0,t.useState)([]),[g,p]=(0,t.useState)({aliasName:"",targetModel:""}),[j,f]=(0,t.useState)(null);(0,t.useEffect)(()=>{x(Object.entries(l).map((e,s)=>{let[l,a]=e;return{id:"".concat(s,"-").concat(l),aliasName:l,targetModel:a}}))},[l]);let b=e=>{f({...e})},v=()=>{if(!j)return;if(!j.aliasName||!j.targetModel){h.Z.fromBackend("Please provide both alias name and target model");return}if(m.some(e=>e.id!==j.id&&e.aliasName===j.aliasName)){h.Z.fromBackend("An alias with this name already exists");return}let e=m.map(e=>e.id===j.id?j:e);x(e),f(null);let s={};e.forEach(e=>{s[e.aliasName]=e.targetModel}),o&&o(s),h.Z.success("Alias updated successfully")},y=()=>{f(null)},_=e=>{let s=m.filter(s=>s.id!==e);x(s);let l={};s.forEach(e=>{l[e.aliasName]=e.targetModel}),o&&o(l),h.Z.success("Alias deleted successfully")},N=m.reduce((e,s)=>(e[s.aliasName]=s.targetModel,e),{});return(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)(c.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,a.jsx)("input",{type:"text",value:g.aliasName,onChange:e=>p({...g,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,a.jsx)(u,{accessToken:s,value:g.targetModel,placeholder:"Select target model",onChange:e=>p({...g,targetModel:e}),showLabel:!1})]}),(0,a.jsx)("div",{className:"flex items-end",children:(0,a.jsxs)("button",{onClick:()=>{if(!g.aliasName||!g.targetModel){h.Z.fromBackend("Please provide both alias name and target model");return}if(m.some(e=>e.aliasName===g.aliasName)){h.Z.fromBackend("An alias with this name already exists");return}let e=[...m,{id:"".concat(Date.now(),"-").concat(g.aliasName),aliasName:g.aliasName,targetModel:g.targetModel}];x(e),p({aliasName:"",targetModel:""});let s={};e.forEach(e=>{s[e.aliasName]=e.targetModel}),o&&o(s),h.Z.success("Alias added successfully")},disabled:!g.aliasName||!g.targetModel,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(g.aliasName&&g.targetModel?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,a.jsx)(r.Z,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,a.jsx)(c.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,a.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)(c.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,a.jsx)(c.ss,{children:(0,a.jsxs)(c.SC,{children:[(0,a.jsx)(c.xs,{className:"py-1 h-8",children:"Alias Name"}),(0,a.jsx)(c.xs,{className:"py-1 h-8",children:"Target Model"}),(0,a.jsx)(c.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,a.jsxs)(c.RM,{children:[m.map(e=>(0,a.jsx)(c.SC,{className:"h-8",children:j&&j.id===e.id?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.pj,{className:"py-0.5",children:(0,a.jsx)("input",{type:"text",value:j.aliasName,onChange:e=>f({...j,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,a.jsx)(c.pj,{className:"py-0.5",children:(0,a.jsx)(u,{accessToken:s,value:j.targetModel,onChange:e=>f({...j,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,a.jsx)(c.pj,{className:"py-0.5 whitespace-nowrap",children:(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:v,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,a.jsx)("button",{onClick:y,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.pj,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,a.jsx)(c.pj,{className:"py-0.5 text-sm text-gray-500",children:e.targetModel}),(0,a.jsx)(c.pj,{className:"py-0.5 whitespace-nowrap",children:(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:()=>b(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,a.jsx)(i.Z,{className:"w-3 h-3"})}),(0,a.jsx)("button",{onClick:()=>_(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,a.jsx)(n.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===m.length&&(0,a.jsx)(c.SC,{children:(0,a.jsx)(c.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),d&&(0,a.jsxs)(c.Zb,{children:[(0,a.jsx)(c.Dx,{className:"mb-4",children:"Configuration Example"}),(0,a.jsx)(c.xv,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,a.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,a.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(N).length?(0,a.jsxs)("span",{className:"text-gray-500",children:[(0,a.jsx)("br",{}),"\xa0\xa0# No aliases configured yet"]}):Object.entries(N).map(e=>{let[s,l]=e;return(0,a.jsxs)("span",{children:[(0,a.jsx)("br",{}),'\xa0\xa0"',s,'": "',l,'"']},s)})]})})]})]})}},2597:function(e,s,l){"use strict";var a=l(57437);l(2265);var t=l(92280),r=l(54507);s.Z=function(e){let{value:s,onChange:l,premiumUser:i=!1,disabledCallbacks:n=[],onDisabledCallbacksChange:c}=e;return i?(0,a.jsx)(r.Z,{value:s,onChange:l,disabledCallbacks:n,onDisabledCallbacksChange:c}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,a.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,a.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,a.jsxs)(t.x,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,a.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}},65925:function(e,s,l){"use strict";l.d(s,{m:function(){return i}});var a=l(57437);l(2265);var t=l(52787);let{Option:r}=t.default,i=e=>e?({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set";s.Z=e=>{let{value:s,onChange:l,className:i="",style:n={}}=e;return(0,a.jsxs)(t.default,{style:{width:"100%",...n},value:s||void 0,onChange:l,className:i,placeholder:"n/a",children:[(0,a.jsx)(r,{value:"24h",children:"daily"}),(0,a.jsx)(r,{value:"7d",children:"weekly"}),(0,a.jsx)(r,{value:"30d",children:"monthly"})]})}},39210:function(e,s,l){"use strict";l.d(s,{Z:function(){return t}});var a=l(19250);let t=async(e,s,l,t,r)=>{let i;i="Admin"!=l&&"Admin Viewer"!=l?await (0,a.teamListCall)(e,(null==t?void 0:t.organization_id)||null,s):await (0,a.teamListCall)(e,(null==t?void 0:t.organization_id)||null),console.log("givenTeams: ".concat(i)),r(i)}},27799:function(e,s,l){"use strict";var a=l(57437);l(2265);var t=l(40728),r=l(82182),i=l(91777),n=l(97434);s.Z=function(e){let{loggingConfigs:s=[],disabledCallbacks:l=[],variant:c="card",className:o=""}=e,d=e=>{var s;return(null===(s=Object.entries(n.Lo).find(s=>{let[l,a]=s;return a===e}))||void 0===s?void 0:s[0])||e},m=e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}},x=e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}},u=(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(r.Z,{className:"h-4 w-4 text-blue-600"}),(0,a.jsx)(t.x,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,a.jsx)(t.C,{color:"blue",size:"xs",children:s.length})]}),s.length>0?(0,a.jsx)("div",{className:"space-y-3",children:s.map((e,s)=>{var l;let i=d(e.callback_name),c=null===(l=n.Dg[i])||void 0===l?void 0:l.logo;return(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[c?(0,a.jsx)("img",{src:c,alt:i,className:"w-5 h-5 object-contain"}):(0,a.jsx)(r.Z,{className:"h-5 w-5 text-gray-400"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(t.x,{className:"font-medium text-blue-800",children:i}),(0,a.jsxs)(t.x,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,a.jsx)(t.C,{color:m(e.callback_type),size:"sm",children:x(e.callback_type)})]},s)})}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,a.jsx)(r.Z,{className:"h-4 w-4 text-gray-400"}),(0,a.jsx)(t.x,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 text-red-600"}),(0,a.jsx)(t.x,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,a.jsx)(t.C,{color:"red",size:"xs",children:l.length})]}),l.length>0?(0,a.jsx)("div",{className:"space-y-3",children:l.map((e,s)=>{var l;let r=n.RD[e]||e,c=null===(l=n.Dg[r])||void 0===l?void 0:l.logo;return(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[c?(0,a.jsx)("img",{src:c,alt:r,className:"w-5 h-5 object-contain"}):(0,a.jsx)(i.Z,{className:"h-5 w-5 text-gray-400"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(t.x,{className:"font-medium text-red-800",children:r}),(0,a.jsx)(t.x,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,a.jsx)(t.C,{color:"red",size:"sm",children:"Disabled"})]},s)})}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 text-gray-400"}),(0,a.jsx)(t.x,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===c?(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(o),children:[(0,a.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(t.x,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,a.jsx)(t.x,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),u]}):(0,a.jsxs)("div",{className:"".concat(o),children:[(0,a.jsx)(t.x,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),u]})}},98015:function(e,s,l){"use strict";l.d(s,{Z:function(){return g}});var a=l(57437),t=l(2265),r=l(92280),i=l(40728),n=l(79814),c=l(19250),o=function(e){let{vectorStores:s,accessToken:l}=e,[r,o]=(0,t.useState)([]);(0,t.useEffect)(()=>{(async()=>{if(l&&0!==s.length)try{let e=await (0,c.vectorStoreListCall)(l);e.data&&o(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[l,s.length]);let d=e=>{let s=r.find(s=>s.vector_store_id===e);return s?"".concat(s.vector_store_name||s.vector_store_id," (").concat(s.vector_store_id,")"):e};return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.Z,{className:"h-4 w-4 text-blue-600"}),(0,a.jsx)(i.x,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,a.jsx)(i.C,{color:"blue",size:"xs",children:s.length})]}),s.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map((e,s)=>(0,a.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:d(e)},s))}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,a.jsx)(n.Z,{className:"h-4 w-4 text-gray-400"}),(0,a.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},d=l(25327),m=l(86462),x=l(47686),u=l(89970),h=function(e){let{mcpServers:s,mcpAccessGroups:r=[],mcpToolPermissions:n={},accessToken:o}=e,[h,g]=(0,t.useState)([]),[p,j]=(0,t.useState)([]),[f,b]=(0,t.useState)(new Set),v=e=>{b(s=>{let l=new Set(s);return l.has(e)?l.delete(e):l.add(e),l})};(0,t.useEffect)(()=>{(async()=>{if(o&&s.length>0)try{let e=await (0,c.fetchMCPServers)(o);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[o,s.length]),(0,t.useEffect)(()=>{(async()=>{if(o&&r.length>0)try{let e=await Promise.resolve().then(l.bind(l,19250)).then(e=>e.fetchMCPAccessGroups(o));j(Array.isArray(e)?e:e.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[o,r.length]);let y=e=>{let s=h.find(s=>s.server_id===e);if(s){let l=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(s.alias," (").concat(l,")")}return e},_=e=>e,N=[...s.map(e=>({type:"server",value:e})),...r.map(e=>({type:"accessGroup",value:e}))],w=N.length;return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(d.Z,{className:"h-4 w-4 text-blue-600"}),(0,a.jsx)(i.x,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,a.jsx)(i.C,{color:"blue",size:"xs",children:w})]}),w>0?(0,a.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:N.map((e,s)=>{let l="server"===e.type?n[e.value]:void 0,t=l&&l.length>0,r=f.has(e.value);return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{onClick:()=>t&&v(e.value),className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ".concat(t?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"),children:[(0,a.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,a.jsx)(u.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,a.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:y(e.value)})]})}):(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,a.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:_(e.value)}),(0,a.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),t&&(0,a.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-gray-600",children:l.length}),(0,a.jsx)("span",{className:"text-xs text-gray-500",children:1===l.length?"tool":"tools"}),r?(0,a.jsx)(m.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,a.jsx)(x.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),t&&r&&(0,a.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:l.map((e,s)=>(0,a.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},s))})})]},s)})}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,a.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"}),(0,a.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},g=function(e){let{objectPermission:s,variant:l="card",className:t="",accessToken:i}=e,n=(null==s?void 0:s.vector_stores)||[],c=(null==s?void 0:s.mcp_servers)||[],d=(null==s?void 0:s.mcp_access_groups)||[],m=(null==s?void 0:s.mcp_tool_permissions)||{},x=(0,a.jsxs)("div",{className:"card"===l?"grid grid-cols-1 md:grid-cols-2 gap-6":"space-y-4",children:[(0,a.jsx)(o,{vectorStores:n,accessToken:i}),(0,a.jsx)(h,{mcpServers:c,mcpAccessGroups:d,mcpToolPermissions:m,accessToken:i})]});return"card"===l?(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(t),children:[(0,a.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(r.x,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,a.jsx)(r.x,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),x]}):(0,a.jsxs)("div",{className:"".concat(t),children:[(0,a.jsx)(r.x,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}},21425:function(e,s,l){"use strict";var a=l(57437);l(2265);var t=l(54507);s.Z=e=>{let{value:s,onChange:l,disabledCallbacks:r=[],onDisabledCallbacksChange:i}=e;return(0,a.jsx)(t.Z,{value:s,onChange:l,disabledCallbacks:r,onDisabledCallbacksChange:i})}},918:function(e,s,l){"use strict";var a=l(57437),t=l(2265),r=l(62490),i=l(19250),n=l(9114);s.Z=e=>{let{accessToken:s,userID:l}=e,[c,o]=(0,t.useState)([]);(0,t.useEffect)(()=>{(async()=>{if(s&&l)try{let e=await (0,i.availableTeamListCall)(s);o(e)}catch(e){console.error("Error fetching available teams:",e)}})()},[s,l]);let d=async e=>{if(s&&l)try{await (0,i.teamMemberAddCall)(s,e,{user_id:l,role:"user"}),n.Z.success("Successfully joined team"),o(s=>s.filter(s=>s.team_id!==e))}catch(e){console.error("Error joining team:",e),n.Z.fromBackend("Failed to join team")}};return(0,a.jsx)(r.Zb,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,a.jsxs)(r.iA,{children:[(0,a.jsx)(r.ss,{children:(0,a.jsxs)(r.SC,{children:[(0,a.jsx)(r.xs,{children:"Team Name"}),(0,a.jsx)(r.xs,{children:"Description"}),(0,a.jsx)(r.xs,{children:"Members"}),(0,a.jsx)(r.xs,{children:"Models"}),(0,a.jsx)(r.xs,{children:"Actions"})]})}),(0,a.jsxs)(r.RM,{children:[c.map(e=>(0,a.jsxs)(r.SC,{children:[(0,a.jsx)(r.pj,{children:(0,a.jsx)(r.xv,{children:e.team_alias})}),(0,a.jsx)(r.pj,{children:(0,a.jsx)(r.xv,{children:e.description||"No description available"})}),(0,a.jsx)(r.pj,{children:(0,a.jsxs)(r.xv,{children:[e.members_with_roles.length," members"]})}),(0,a.jsx)(r.pj,{children:(0,a.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,s)=>(0,a.jsx)(r.Ct,{size:"xs",className:"mb-1",color:"blue",children:(0,a.jsx)(r.xv,{children:e.length>30?"".concat(e.slice(0,30),"..."):e})},s)):(0,a.jsx)(r.Ct,{size:"xs",color:"red",children:(0,a.jsx)(r.xv,{children:"All Proxy Models"})})})}),(0,a.jsx)(r.pj,{children:(0,a.jsx)(r.zx,{size:"xs",variant:"secondary",onClick:()=>d(e.team_id),children:"Join Team"})})]},e.team_id)),0===c.length&&(0,a.jsx)(r.SC,{children:(0,a.jsx)(r.pj,{colSpan:5,className:"text-center",children:(0,a.jsx)(r.xv,{children:"No available teams to join"})})})]})]})})}},33304:function(e,s,l){"use strict";function a(e){return""===e?null:e}l.d(s,{C:function(){return a}})}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2284,7908,9678,8714,7281,3310,8049,131,2004,2012,2971,2117,1744],function(){return e(e.s=77403)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9483],{77403:function(e,s,l){Promise.resolve().then(l.bind(l,67578))},40728:function(e,s,l){"use strict";l.d(s,{C:function(){return a.Z},x:function(){return t.Z}});var a=l(41649),t=l(84264)},88913:function(e,s,l){"use strict";l.d(s,{Dx:function(){return c.Z},Zb:function(){return t.Z},iz:function(){return r.Z},oi:function(){return n.Z},xv:function(){return i.Z},zx:function(){return a.Z}});var a=l(20831),t=l(12514),r=l(67982),i=l(84264),n=l(49566),c=l(96761)},25512:function(e,s,l){"use strict";l.d(s,{P:function(){return a.Z},Q:function(){return t.Z}});var a=l(27281),t=l(57365)},67578:function(e,s,l){"use strict";l.r(s),l.d(s,{default:function(){return ej}});var a=l(57437),t=l(2265),r=l(19250),i=l(39210),n=l(13634),c=l(33293),o=l(88904),d=l(20347),m=l(20831),x=l(12514),u=l(49804),h=l(67101),g=l(29706),p=l(84264),j=l(918),f=l(59872),b=l(47323),v=l(12485),y=l(18135),_=l(35242),N=l(77991),w=l(23628),Z=e=>{let{lastRefreshed:s,onRefresh:l,userRole:t,children:r}=e;return(0,a.jsxs)(y.Z,{className:"gap-2 h-[75vh] w-full",children:[(0,a.jsxs)(_.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)(v.Z,{children:"Your Teams"}),(0,a.jsx)(v.Z,{children:"Available Teams"}),(0,d.tY)(t||"")&&(0,a.jsx)(v.Z,{children:"Default Team Settings"})]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[s&&(0,a.jsxs)(p.Z,{children:["Last Refreshed: ",s]}),(0,a.jsx)(b.Z,{icon:w.Z,variant:"shadow",size:"xs",className:"self-center",onClick:l})]})]}),(0,a.jsx)(N.Z,{children:r})]})},C=l(25512),S=e=>{let{filters:s,organizations:l,showFilters:t,onToggleFilters:r,onChange:i,onReset:n}=e;return(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("div",{className:"relative w-64",children:[(0,a.jsx)("input",{type:"text",placeholder:"Search by Team Name...",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:s.team_alias,onChange:e=>i("team_alias",e.target.value)}),(0,a.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,a.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,a.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ".concat(t?"bg-gray-100":""),onClick:()=>r(!t),children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.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"})}),"Filters",(s.team_id||s.team_alias||s.organization_id)&&(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-blue-500"})]}),(0,a.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:n,children:[(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.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"})}),"Reset Filters"]})]}),t&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,a.jsxs)("div",{className:"relative w-64",children:[(0,a.jsx)("input",{type:"text",placeholder:"Enter Team 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:s.team_id,onChange:e=>i("team_id",e.target.value)}),(0,a.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,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),(0,a.jsx)("div",{className:"w-64",children:(0,a.jsx)(C.P,{value:s.organization_id||"",onValueChange:e=>i("organization_id",e),placeholder:"Select Organization",children:null==l?void 0:l.map(e=>(0,a.jsx)(C.Q,{value:e.organization_id||"",children:e.organization_alias||e.organization_id},e.organization_id))})})]})]})},k=l(80443),T=e=>{let{currentOrg:s,setTeams:l}=e,[a,r]=(0,t.useState)(""),{accessToken:n,userId:c,userRole:o}=(0,k.Z)(),d=(0,t.useCallback)(()=>{r(new Date().toLocaleString())},[]);return(0,t.useEffect)(()=>{n&&(0,i.Z)(n,c,o,s,l).then(),d()},[n,s,a,d,l,c,o]),{lastRefreshed:a,setLastRefreshed:r,onRefreshClick:d}},M=l(21626),z=l(97214),A=l(28241),E=l(58834),D=l(69552),F=l(71876),L=l(89970),P=l(53410),O=l(74998),I=l(41649),V=l(86462),R=l(47686),B=l(46468),W=e=>{let{team:s}=e,[l,r]=(0,t.useState)(!1);return(0,a.jsx)(A.Z,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:s.models.length>3?"px-0":"",children:(0,a.jsx)("div",{className:"flex flex-col",children:Array.isArray(s.models)?(0,a.jsx)("div",{className:"flex flex-col",children:0===s.models.length?(0,a.jsx)(I.Z,{size:"xs",className:"mb-1",color:"red",children:(0,a.jsx)(p.Z,{children:"All Proxy Models"})}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex items-start",children:[s.models.length>3&&(0,a.jsx)("div",{children:(0,a.jsx)(b.Z,{icon:l?V.Z:R.Z,className:"cursor-pointer",size:"xs",onClick:()=>{r(e=>!e)}})}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[s.models.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,a.jsx)(I.Z,{size:"xs",color:"red",children:(0,a.jsx)(p.Z,{children:"All Proxy Models"})},s):(0,a.jsx)(I.Z,{size:"xs",color:"blue",children:(0,a.jsx)(p.Z,{children:e.length>30?"".concat((0,B.W0)(e).slice(0,30),"..."):(0,B.W0)(e)})},s)),s.models.length>3&&!l&&(0,a.jsx)(I.Z,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,a.jsxs)(p.Z,{children:["+",s.models.length-3," ",s.models.length-3==1?"more model":"more models"]})}),l&&(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:s.models.slice(3).map((e,s)=>"all-proxy-models"===e?(0,a.jsx)(I.Z,{size:"xs",color:"red",children:(0,a.jsx)(p.Z,{children:"All Proxy Models"})},s+3):(0,a.jsx)(I.Z,{size:"xs",color:"blue",children:(0,a.jsx)(p.Z,{children:e.length>30?"".concat((0,B.W0)(e).slice(0,30),"..."):(0,B.W0)(e)})},s+3))})]})]})})}):null})})},U=l(88906),G=l(92369),J=e=>{let s="inline-flex items-center px-2.5 py-0.5 rounded-md text-xs font-medium border";return"admin"===e?(0,a.jsxs)("span",{className:s,style:{backgroundColor:"#EEF2FF",color:"#3730A3",borderColor:"#C7D2FE"},children:[(0,a.jsx)(U.Z,{className:"h-3 w-3 mr-1"}),"Admin"]}):(0,a.jsxs)("span",{className:s,style:{backgroundColor:"#F3F4F6",color:"#4B5563",borderColor:"#E5E7EB"},children:[(0,a.jsx)(G.Z,{className:"h-3 w-3 mr-1"}),"Member"]})};let Q=(e,s)=>{var l,a;if(!s)return null;let t=null===(l=e.members_with_roles)||void 0===l?void 0:l.find(e=>e.user_id===s);return null!==(a=null==t?void 0:t.role)&&void 0!==a?a:null};var q=e=>{let{team:s,userId:l}=e,t=J(Q(s,l));return(0,a.jsx)(A.Z,{children:t})},K=e=>{let{teams:s,currentOrg:l,setSelectedTeamId:t,perTeamInfo:r,userRole:i,userId:n,setEditTeam:c,onDeleteTeam:o}=e;return(0,a.jsxs)(M.Z,{children:[(0,a.jsx)(E.Z,{children:(0,a.jsxs)(F.Z,{children:[(0,a.jsx)(D.Z,{children:"Team Name"}),(0,a.jsx)(D.Z,{children:"Team ID"}),(0,a.jsx)(D.Z,{children:"Created"}),(0,a.jsx)(D.Z,{children:"Spend (USD)"}),(0,a.jsx)(D.Z,{children:"Budget (USD)"}),(0,a.jsx)(D.Z,{children:"Models"}),(0,a.jsx)(D.Z,{children:"Organization"}),(0,a.jsx)(D.Z,{children:"Your Role"}),(0,a.jsx)(D.Z,{children:"Info"})]})}),(0,a.jsx)(z.Z,{children:s&&s.length>0?s.filter(e=>!l||e.organization_id===l.organization_id).sort((e,s)=>new Date(s.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,a.jsxs)(F.Z,{children:[(0,a.jsx)(A.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,a.jsx)(A.Z,{children:(0,a.jsx)("div",{className:"overflow-hidden",children:(0,a.jsx)(L.Z,{title:e.team_id,children:(0,a.jsxs)(m.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:()=>{t(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,a.jsx)(A.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,a.jsx)(A.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:(0,f.pw)(e.spend,4)}),(0,a.jsx)(A.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,a.jsx)(W,{team:e}),(0,a.jsx)(A.Z,{children:e.organization_id}),(0,a.jsx)(q,{team:e,userId:n}),(0,a.jsxs)(A.Z,{children:[(0,a.jsxs)(p.Z,{children:[r&&e.team_id&&r[e.team_id]&&r[e.team_id].keys&&r[e.team_id].keys.length," ","Keys"]}),(0,a.jsxs)(p.Z,{children:[r&&e.team_id&&r[e.team_id]&&r[e.team_id].team_info&&r[e.team_id].team_info.members_with_roles&&r[e.team_id].team_info.members_with_roles.length," ","Members"]})]}),(0,a.jsx)(A.Z,{children:"Admin"==i?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.Z,{icon:P.Z,size:"sm",onClick:()=>{t(e.team_id),c(!0)}}),(0,a.jsx)(b.Z,{onClick:()=>o(e.team_id),icon:O.Z,size:"sm"})]}):null})]},e.team_id)):null})]})},X=l(32489),Y=l(76865),H=e=>{var s;let{teams:l,teamToDelete:r,onCancel:i,onConfirm:n}=e,[c,o]=(0,t.useState)(""),d=null==l?void 0:l.find(e=>e.team_id===r),m=(null==d?void 0:d.team_alias)||"",x=(null==d?void 0:null===(s=d.keys)||void 0===s?void 0:s.length)||0,u=c===m;return(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl min-h-[380px] py-6 overflow-hidden transform transition-all flex flex-col justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Delete Team"}),(0,a.jsx)("button",{onClick:()=>{i(),o("")},className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:(0,a.jsx)(X.Z,{size:20})})]}),(0,a.jsxs)("div",{className:"px-6 py-4",children:[x>0&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,a.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,a.jsx)(Y.Z,{size:20})}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-base font-medium text-red-600",children:["Warning: This team has ",x," associated key",x>1?"s":"","."]}),(0,a.jsx)("p",{className:"text-base text-red-600 mt-2",children:"Deleting the team will also delete all associated keys. This action is irreversible."})]})]}),(0,a.jsx)("p",{className:"text-base text-gray-600 mb-5",children:"Are you sure you want to force delete this team and all its keys?"}),(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,a.jsx)("span",{className:"underline",children:m})," to confirm deletion:"]}),(0,a.jsx)("input",{type:"text",value:c,onChange:e=>o(e.target.value),placeholder:"Enter team name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]})]})]}),(0,a.jsxs)("div",{className:"px-6 py-4 bg-gray-50 flex justify-end gap-4",children:[(0,a.jsx)("button",{onClick:()=>{i(),o("")},className:"px-5 py-3 bg-white border border-gray-300 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Cancel"}),(0,a.jsx)("button",{onClick:n,disabled:!u,className:"px-5 py-3 rounded-md text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 ".concat(u?"bg-red-600 hover:bg-red-700":"bg-red-300 cursor-not-allowed"),children:"Force Delete"})]})]})})},$=l(82680),ee=l(52787),es=l(64482),el=l(73002),ea=l(26210),et=l(15424),er=l(24199),ei=l(97415),en=l(95920),ec=l(2597),eo=l(51750),ed=l(9114),em=l(68473);let ex=(e,s)=>{let l=[];return e&&e.models.length>0?(console.log("organization.models: ".concat(e.models)),l=e.models):l=s,(0,B.Ob)(l,s)};var eu=e=>{let{isTeamModalVisible:s,handleOk:l,handleCancel:i,currentOrg:c,organizations:o,teams:d,setTeams:m,modelAliases:x,setModelAliases:u,loggingSettings:h,setLoggingSettings:g,setIsTeamModalVisible:p}=e,{userId:j,userRole:f,accessToken:b,premiumUser:v}=(0,k.Z)(),[y]=n.Z.useForm(),[_,N]=(0,t.useState)([]),[w,Z]=(0,t.useState)(null),[C,S]=(0,t.useState)([]),[T,M]=(0,t.useState)([]),[z,A]=(0,t.useState)([]),[E,D]=(0,t.useState)(!1);(0,t.useEffect)(()=>{(async()=>{try{if(null===j||null===f||null===b)return;let e=await (0,B.K2)(j,f,b);e&&N(e)}catch(e){console.error("Error fetching user models:",e)}})()},[b,j,f,d]),(0,t.useEffect)(()=>{console.log("currentOrgForCreateTeam: ".concat(w));let e=ex(w,_);console.log("models: ".concat(e)),S(e),y.setFieldValue("models",[])},[w,_,y]);let F=async()=>{try{if(null==b)return;let e=await (0,r.fetchMCPAccessGroups)(b);A(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,t.useEffect)(()=>{F()},[b,F]),(0,t.useEffect)(()=>{(async()=>{try{if(null==b)return;let e=(await (0,r.getGuardrailsList)(b)).guardrails.map(e=>e.guardrail_name);M(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[b]);let P=async e=>{try{if(console.log("formValues: ".concat(JSON.stringify(e))),null!=b){var s,l,a;let t=null==e?void 0:e.team_alias,i=null!==(a=null==d?void 0:d.map(e=>e.team_alias))&&void 0!==a?a:[],n=(null==e?void 0:e.organization_id)||(null==c?void 0:c.organization_id);if(""===n||"string"!=typeof n?e.organization_id=null:e.organization_id=n.trim(),i.includes(t))throw Error("Team alias ".concat(t," already exists, please pick another alias"));if(ed.Z.info("Creating Team"),h.length>0){let s={};if(e.metadata)try{s=JSON.parse(e.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}s={...s,logging:h.filter(e=>e.callback_name)},e.metadata=JSON.stringify(s)}if(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||e.allowed_mcp_servers_and_groups&&((null===(s=e.allowed_mcp_servers_and_groups.servers)||void 0===s?void 0:s.length)>0||(null===(l=e.allowed_mcp_servers_and_groups.accessGroups)||void 0===l?void 0:l.length)>0||e.allowed_mcp_servers_and_groups.toolPermissions)){if(e.object_permission={},e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission.vector_stores=e.allowed_vector_store_ids,delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups){let{servers:s,accessGroups:l}=e.allowed_mcp_servers_and_groups;s&&s.length>0&&(e.object_permission.mcp_servers=s),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),delete e.allowed_mcp_servers_and_groups}e.mcp_tool_permissions&&Object.keys(e.mcp_tool_permissions).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=e.mcp_tool_permissions,delete e.mcp_tool_permissions)}e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),Object.keys(x).length>0&&(e.model_aliases=x);let o=await (0,r.teamCreateCall)(b,e);null!==d?m([...d,o]):m([o]),console.log("response for team create call: ".concat(o)),ed.Z.success("Team created"),y.resetFields(),g([]),u({}),p(!1)}}catch(e){console.error("Error creating the team:",e),ed.Z.fromBackend("Error creating the team: "+e)}};return(0,a.jsx)($.Z,{title:"Create Team",open:s,width:1e3,footer:null,onOk:l,onCancel:i,children:(0,a.jsxs)(n.Z,{form:y,onFinish:P,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,a.jsx)(ea.oi,{placeholder:""})}),(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Organization"," ",(0,a.jsx)(L.Z,{title:(0,a.jsxs)("span",{children:["Organizations can have multiple teams. Learn more about"," ",(0,a.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,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:c?c.organization_id:null,className:"mt-8",children:(0,a.jsx)(ee.default,{showSearch:!0,allowClear:!0,placeholder:"Search or select an Organization",onChange:e=>{y.setFieldValue("organization_id",e),Z((null==o?void 0:o.find(s=>s.organization_id===e))||null)},filterOption:(e,s)=>{var l;return!!s&&((null===(l=s.children)||void 0===l?void 0:l.toString())||"").toLowerCase().includes(e.toLowerCase())},optionFilterProp:"children",children:null==o?void 0:o.map(e=>(0,a.jsxs)(ee.default.Option,{value:e.organization_id,children:[(0,a.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,a.jsxs)("span",{className:"text-gray-500",children:["(",e.organization_id,")"]})]},e.organization_id))})}),(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Models"," ",(0,a.jsx)(L.Z,{title:"These are the models that your selected team has access to",children:(0,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,a.jsxs)(ee.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,a.jsx)(ee.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),C.map(e=>(0,a.jsx)(ee.default.Option,{value:e,children:(0,B.W0)(e)},e))]})}),(0,a.jsx)(n.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,a.jsx)(er.Z,{step:.01,precision:2,width:200})}),(0,a.jsx)(n.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,a.jsxs)(ee.default,{defaultValue:null,placeholder:"n/a",children:[(0,a.jsx)(ee.default.Option,{value:"24h",children:"daily"}),(0,a.jsx)(ee.default.Option,{value:"7d",children:"weekly"}),(0,a.jsx)(ee.default.Option,{value:"30d",children:"monthly"})]})}),(0,a.jsx)(n.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,a.jsx)(er.Z,{step:1,width:400})}),(0,a.jsx)(n.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,a.jsx)(er.Z,{step:1,width:400})}),(0,a.jsxs)(ea.UQ,{className:"mt-20 mb-8",onClick:()=>{E||(F(),D(!0))},children:[(0,a.jsx)(ea._m,{children:(0,a.jsx)("b",{children:"Additional Settings"})}),(0,a.jsxs)(ea.X1,{children:[(0,a.jsx)(n.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,a.jsx)(ea.oi,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,a.jsx)(n.Z.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,a.jsx)(er.Z,{step:.01,precision:2,width:200})}),(0,a.jsx)(n.Z.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,a.jsx)(ea.oi,{placeholder:"e.g., 30d"})}),(0,a.jsx)(n.Z.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,a.jsx)(er.Z,{step:1,width:400})}),(0,a.jsx)(n.Z.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,a.jsx)(er.Z,{step:1,width:400})}),(0,a.jsx)(n.Z.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,a.jsx)(es.default.TextArea,{rows:4})}),(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Guardrails"," ",(0,a.jsx)(L.Z,{title:"Setup your first guardrail",children:(0,a.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,a.jsx)(ee.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:T.map(e=>({value:e,label:e}))})}),(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,a.jsx)(L.Z,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,a.jsx)(ei.Z,{onChange:e=>y.setFieldValue("allowed_vector_store_ids",e),value:y.getFieldValue("allowed_vector_store_ids"),accessToken:b||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,a.jsxs)(ea.UQ,{className:"mt-8 mb-8",children:[(0,a.jsx)(ea._m,{children:(0,a.jsx)("b",{children:"MCP Settings"})}),(0,a.jsxs)(ea.X1,{children:[(0,a.jsx)(n.Z.Item,{label:(0,a.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,a.jsx)(L.Z,{title:"Select which MCP servers or access groups this team can access",children:(0,a.jsx)(et.Z,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,a.jsx)(en.Z,{onChange:e=>y.setFieldValue("allowed_mcp_servers_and_groups",e),value:y.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:b||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,a.jsx)(n.Z.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,a.jsx)(es.default,{type:"hidden"})}),(0,a.jsx)(n.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_mcp_servers_and_groups!==s.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>{var e;return(0,a.jsx)("div",{className:"mt-6",children:(0,a.jsx)(em.Z,{accessToken:b||"",selectedServers:(null===(e=y.getFieldValue("allowed_mcp_servers_and_groups"))||void 0===e?void 0:e.servers)||[],toolPermissions:y.getFieldValue("mcp_tool_permissions")||{},onChange:e=>y.setFieldsValue({mcp_tool_permissions:e})})})}})]})]}),(0,a.jsxs)(ea.UQ,{className:"mt-8 mb-8",children:[(0,a.jsx)(ea._m,{children:(0,a.jsx)("b",{children:"Logging Settings"})}),(0,a.jsx)(ea.X1,{children:(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(ec.Z,{value:h,onChange:g,premiumUser:v})})})]}),(0,a.jsxs)(ea.UQ,{className:"mt-8 mb-8",children:[(0,a.jsx)(ea._m,{children:(0,a.jsx)("b",{children:"Model Aliases"})}),(0,a.jsx)(ea.X1,{children:(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)(ea.xv,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,a.jsx)(eo.Z,{accessToken:b||"",initialModelAliases:x,onAliasUpdate:u,showExampleConfig:!1})]})})]})]}),(0,a.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,a.jsx)(el.ZP,{htmlType:"submit",children:"Create Team"})})]})})},eh=e=>{let{teams:s,accessToken:l,setTeams:b,userID:v,userRole:y,organizations:_,premiumUser:N=!1}=e,[w,C]=(0,t.useState)(null),[k,M]=(0,t.useState)(!1),[z,A]=(0,t.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),[E]=n.Z.useForm(),[D]=n.Z.useForm(),[F,L]=(0,t.useState)(null),[P,O]=(0,t.useState)(!1),[I,V]=(0,t.useState)(!1),[R,B]=(0,t.useState)(!1),[W,U]=(0,t.useState)(!1),[G,J]=(0,t.useState)([]),[Q,q]=(0,t.useState)(!1),[X,Y]=(0,t.useState)(null),[$,ee]=(0,t.useState)({}),[es,el]=(0,t.useState)([]),[ea,et]=(0,t.useState)({}),{lastRefreshed:er,onRefreshClick:ei}=T({currentOrg:w,setTeams:b});(0,t.useEffect)(()=>{s&&ee(s.reduce((e,s)=>(e[s.team_id]={keys:s.keys||[],team_info:{members_with_roles:s.members_with_roles||[]}},e),{}))},[s]);let en=async e=>{Y(e),q(!0)},ec=async()=>{if(null!=X&&null!=s&&null!=l){try{await (0,r.teamDeleteCall)(l,X),(0,i.Z)(l,v,y,w,b)}catch(e){console.error("Error deleting the team:",e)}q(!1),Y(null)}};return(0,a.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,a.jsx)(h.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,a.jsxs)(u.Z,{numColSpan:1,className:"flex flex-col gap-2",children:[("Admin"==y||"Org Admin"==y)&&(0,a.jsx)(m.Z,{className:"w-fit",onClick:()=>V(!0),children:"+ Create New Team"}),F?(0,a.jsx)(c.Z,{teamId:F,onUpdate:e=>{b(s=>{if(null==s)return s;let a=s.map(s=>e.team_id===s.team_id?(0,f.nl)(s,e):s);return l&&(0,i.Z)(l,v,y,w,b),a})},onClose:()=>{L(null),O(!1)},accessToken:l,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let s=0;se.team_id===F)),is_proxy_admin:"Admin"==y,userModels:G,editTeam:P}):(0,a.jsxs)(Z,{lastRefreshed:er,onRefresh:ei,userRole:y,children:[(0,a.jsxs)(g.Z,{children:[(0,a.jsxs)(p.Z,{children:["Click on “Team ID” to view team details ",(0,a.jsx)("b",{children:"and"})," manage team members."]}),(0,a.jsx)(h.Z,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,a.jsx)(u.Z,{numColSpan:1,children:(0,a.jsxs)(x.Z,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,a.jsx)("div",{className:"border-b px-6 py-4",children:(0,a.jsx)("div",{className:"flex flex-col space-y-4",children:(0,a.jsx)(S,{filters:z,organizations:_,showFilters:k,onToggleFilters:M,onChange:(e,s)=>{let a={...z,[e]:s};A(a),l&&(0,r.v2TeamListCall)(l,a.organization_id||null,null,a.team_id||null,a.team_alias||null).then(e=>{e&&e.teams&&b(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})},onReset:()=>{A({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),l&&(0,r.v2TeamListCall)(l,null,v||null,null,null).then(e=>{e&&e.teams&&b(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})}})})}),(0,a.jsx)(K,{teams:s,currentOrg:w,perTeamInfo:$,userRole:y,userId:v,setSelectedTeamId:L,setEditTeam:O,onDeleteTeam:en}),Q&&(0,a.jsx)(H,{teams:s,teamToDelete:X,onCancel:()=>{q(!1),Y(null)},onConfirm:ec})]})})})]}),(0,a.jsx)(g.Z,{children:(0,a.jsx)(j.Z,{accessToken:l,userID:v})}),(0,d.tY)(y||"")&&(0,a.jsx)(g.Z,{children:(0,a.jsx)(o.Z,{accessToken:l,userID:v||"",userRole:y||""})})]}),("Admin"==y||"Org Admin"==y)&&(0,a.jsx)(eu,{isTeamModalVisible:I,handleOk:()=>{V(!1),E.resetFields(),el([]),et({})},handleCancel:()=>{V(!1),E.resetFields(),el([]),et({})},currentOrg:w,organizations:_,teams:s,setTeams:b,modelAliases:ea,setModelAliases:et,loggingSettings:es,setLoggingSettings:el,setIsTeamModalVisible:V})]})})})},eg=l(11318),ep=l(22004),ej=()=>{let{accessToken:e,userId:s,userRole:l}=(0,k.Z)(),{teams:r,setTeams:i}=(0,eg.Z)(),[n,c]=(0,t.useState)([]);return(0,t.useEffect)(()=>{(0,ep.g)(e,c).then(()=>{})},[e]),(0,a.jsx)(eh,{teams:r,accessToken:e,setTeams:i,userID:s,userRole:l,organizations:n})}},88904:function(e,s,l){"use strict";var a=l(57437),t=l(2265),r=l(88913),i=l(93192),n=l(52787),c=l(63709),o=l(87908),d=l(19250),m=l(65925),x=l(46468),u=l(9114);s.Z=e=>{var s;let{accessToken:l,userID:h,userRole:g}=e,[p,j]=(0,t.useState)(!0),[f,b]=(0,t.useState)(null),[v,y]=(0,t.useState)(!1),[_,N]=(0,t.useState)({}),[w,Z]=(0,t.useState)(!1),[C,S]=(0,t.useState)([]),{Paragraph:k}=i.default,{Option:T}=n.default;(0,t.useEffect)(()=>{(async()=>{if(!l){j(!1);return}try{let e=await (0,d.getDefaultTeamSettings)(l);if(b(e),N(e.values||{}),l)try{let e=await (0,d.modelAvailableCall)(l,h,g);if(e&&e.data){let s=e.data.map(e=>e.id);S(s)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching team SSO settings:",e),u.Z.fromBackend("Failed to fetch team settings")}finally{j(!1)}})()},[l]);let M=async()=>{if(l){Z(!0);try{let e=await (0,d.updateDefaultTeamSettings)(l,_);b({...f,values:e.settings}),y(!1),u.Z.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),u.Z.fromBackend("Failed to update team settings")}finally{Z(!1)}}},z=(e,s)=>{N(l=>({...l,[e]:s}))},A=(e,s,l)=>{var t;let i=s.type;return"budget_duration"===e?(0,a.jsx)(m.Z,{value:_[e]||null,onChange:s=>z(e,s),className:"mt-2"}):"boolean"===i?(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(c.Z,{checked:!!_[e],onChange:s=>z(e,s)})}):"array"===i&&(null===(t=s.items)||void 0===t?void 0:t.enum)?(0,a.jsx)(n.default,{mode:"multiple",style:{width:"100%"},value:_[e]||[],onChange:s=>z(e,s),className:"mt-2",children:s.items.enum.map(e=>(0,a.jsx)(T,{value:e,children:e},e))}):"models"===e?(0,a.jsx)(n.default,{mode:"multiple",style:{width:"100%"},value:_[e]||[],onChange:s=>z(e,s),className:"mt-2",children:C.map(e=>(0,a.jsx)(T,{value:e,children:(0,x.W0)(e)},e))}):"string"===i&&s.enum?(0,a.jsx)(n.default,{style:{width:"100%"},value:_[e]||"",onChange:s=>z(e,s),className:"mt-2",children:s.enum.map(e=>(0,a.jsx)(T,{value:e,children:e},e))}):(0,a.jsx)(r.oi,{value:void 0!==_[e]?String(_[e]):"",onChange:s=>z(e,s.target.value),placeholder:s.description||"",className:"mt-2"})},E=(e,s)=>null==s?(0,a.jsx)("span",{className:"text-gray-400",children:"Not set"}):"budget_duration"===e?(0,a.jsx)("span",{children:(0,m.m)(s)}):"boolean"==typeof s?(0,a.jsx)("span",{children:s?"Enabled":"Disabled"}):"models"===e&&Array.isArray(s)?0===s.length?(0,a.jsx)("span",{className:"text-gray-400",children:"None"}):(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,a.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,x.W0)(e)},s))}):"object"==typeof s?Array.isArray(s)?0===s.length?(0,a.jsx)("span",{className:"text-gray-400",children:"None"}):(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,a.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,a.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(s,null,2)}):(0,a.jsx)("span",{children:String(s)});return p?(0,a.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,a.jsx)(o.Z,{size:"large"})}):f?(0,a.jsxs)(r.Zb,{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)(r.Dx,{className:"text-xl",children:"Default Team Settings"}),!p&&f&&(v?(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.zx,{variant:"secondary",onClick:()=>{y(!1),N(f.values||{})},disabled:w,children:"Cancel"}),(0,a.jsx)(r.zx,{onClick:M,loading:w,children:"Save Changes"})]}):(0,a.jsx)(r.zx,{onClick:()=>y(!0),children:"Edit Settings"}))]}),(0,a.jsx)(r.xv,{children:"These settings will be applied by default when creating new teams."}),(null==f?void 0:null===(s=f.field_schema)||void 0===s?void 0:s.description)&&(0,a.jsx)(k,{className:"mb-4 mt-2",children:f.field_schema.description}),(0,a.jsx)(r.iz,{}),(0,a.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:s}=f;return s&&s.properties?Object.entries(s.properties).map(s=>{let[l,t]=s,i=e[l],n=l.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase());return(0,a.jsxs)("div",{className:"mb-6 pb-6 border-b border-gray-200 last:border-0",children:[(0,a.jsx)(r.xv,{className:"font-medium text-lg",children:n}),(0,a.jsx)(k,{className:"text-sm text-gray-500 mt-1",children:t.description||"No description available"}),v?(0,a.jsx)("div",{className:"mt-2",children:A(l,t,i)}):(0,a.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:E(l,i)})]},l)}):(0,a.jsx)(r.xv,{children:"No schema information available"})})()})]}):(0,a.jsx)(r.Zb,{children:(0,a.jsx)(r.xv,{children:"No team settings available or you do not have permission to view them."})})}},51750:function(e,s,l){"use strict";l.d(s,{Z:function(){return g}});var a=l(57437),t=l(2265),r=l(77355),i=l(93416),n=l(74998),c=l(95704),o=l(56522),d=l(52787),m=l(69993),x=l(51601),u=e=>{let{accessToken:s,value:l,placeholder:r="Select a Model",onChange:i,disabled:n=!1,style:c,className:u,showLabel:h=!0,labelText:g="Select Model"}=e,[p,j]=(0,t.useState)(l),[f,b]=(0,t.useState)(!1),[v,y]=(0,t.useState)([]),_=(0,t.useRef)(null);return(0,t.useEffect)(()=>{j(l)},[l]),(0,t.useEffect)(()=>{s&&(async()=>{try{let e=await (0,x.p)(s);console.log("Fetched models for selector:",e),e.length>0&&y(e)}catch(e){console.error("Error fetching model info:",e)}})()},[s]),(0,a.jsxs)("div",{children:[h&&(0,a.jsxs)(o.x,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,a.jsx)(m.Z,{className:"mr-2"})," ",g]}),(0,a.jsx)(d.default,{value:p,placeholder:r,onChange:e=>{"custom"===e?(b(!0),j(void 0)):(b(!1),j(e),i&&i(e))},options:[...Array.from(new Set(v.map(e=>e.model_group))).map((e,s)=>({value:e,label:e,key:s})),{value:"custom",label:"Enter custom model",key:"custom"}],style:{width:"100%",...c},showSearch:!0,className:"rounded-md ".concat(u||""),disabled:n}),f&&(0,a.jsx)(o.o,{className:"mt-2",placeholder:"Enter custom model name",onValueChange:e=>{_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{j(e),i&&i(e)},500)},disabled:n})]})},h=l(9114),g=e=>{let{accessToken:s,initialModelAliases:l={},onAliasUpdate:o,showExampleConfig:d=!0}=e,[m,x]=(0,t.useState)([]),[g,p]=(0,t.useState)({aliasName:"",targetModel:""}),[j,f]=(0,t.useState)(null);(0,t.useEffect)(()=>{x(Object.entries(l).map((e,s)=>{let[l,a]=e;return{id:"".concat(s,"-").concat(l),aliasName:l,targetModel:a}}))},[l]);let b=e=>{f({...e})},v=()=>{if(!j)return;if(!j.aliasName||!j.targetModel){h.Z.fromBackend("Please provide both alias name and target model");return}if(m.some(e=>e.id!==j.id&&e.aliasName===j.aliasName)){h.Z.fromBackend("An alias with this name already exists");return}let e=m.map(e=>e.id===j.id?j:e);x(e),f(null);let s={};e.forEach(e=>{s[e.aliasName]=e.targetModel}),o&&o(s),h.Z.success("Alias updated successfully")},y=()=>{f(null)},_=e=>{let s=m.filter(s=>s.id!==e);x(s);let l={};s.forEach(e=>{l[e.aliasName]=e.targetModel}),o&&o(l),h.Z.success("Alias deleted successfully")},N=m.reduce((e,s)=>(e[s.aliasName]=s.targetModel,e),{});return(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)(c.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,a.jsx)("input",{type:"text",value:g.aliasName,onChange:e=>p({...g,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,a.jsx)(u,{accessToken:s,value:g.targetModel,placeholder:"Select target model",onChange:e=>p({...g,targetModel:e}),showLabel:!1})]}),(0,a.jsx)("div",{className:"flex items-end",children:(0,a.jsxs)("button",{onClick:()=>{if(!g.aliasName||!g.targetModel){h.Z.fromBackend("Please provide both alias name and target model");return}if(m.some(e=>e.aliasName===g.aliasName)){h.Z.fromBackend("An alias with this name already exists");return}let e=[...m,{id:"".concat(Date.now(),"-").concat(g.aliasName),aliasName:g.aliasName,targetModel:g.targetModel}];x(e),p({aliasName:"",targetModel:""});let s={};e.forEach(e=>{s[e.aliasName]=e.targetModel}),o&&o(s),h.Z.success("Alias added successfully")},disabled:!g.aliasName||!g.targetModel,className:"flex items-center px-4 py-2 rounded-md text-sm ".concat(g.aliasName&&g.targetModel?"bg-green-600 text-white hover:bg-green-700":"bg-gray-300 text-gray-500 cursor-not-allowed"),children:[(0,a.jsx)(r.Z,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,a.jsx)(c.xv,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,a.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)(c.iA,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,a.jsx)(c.ss,{children:(0,a.jsxs)(c.SC,{children:[(0,a.jsx)(c.xs,{className:"py-1 h-8",children:"Alias Name"}),(0,a.jsx)(c.xs,{className:"py-1 h-8",children:"Target Model"}),(0,a.jsx)(c.xs,{className:"py-1 h-8",children:"Actions"})]})}),(0,a.jsxs)(c.RM,{children:[m.map(e=>(0,a.jsx)(c.SC,{className:"h-8",children:j&&j.id===e.id?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.pj,{className:"py-0.5",children:(0,a.jsx)("input",{type:"text",value:j.aliasName,onChange:e=>f({...j,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,a.jsx)(c.pj,{className:"py-0.5",children:(0,a.jsx)(u,{accessToken:s,value:j.targetModel,onChange:e=>f({...j,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,a.jsx)(c.pj,{className:"py-0.5 whitespace-nowrap",children:(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:v,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:"Save"}),(0,a.jsx)("button",{onClick:y,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded hover:bg-gray-100",children:"Cancel"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.pj,{className:"py-0.5 text-sm text-gray-900",children:e.aliasName}),(0,a.jsx)(c.pj,{className:"py-0.5 text-sm text-gray-500",children:e.targetModel}),(0,a.jsx)(c.pj,{className:"py-0.5 whitespace-nowrap",children:(0,a.jsxs)("div",{className:"flex space-x-2",children:[(0,a.jsx)("button",{onClick:()=>b(e),className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded hover:bg-blue-100",children:(0,a.jsx)(i.Z,{className:"w-3 h-3"})}),(0,a.jsx)("button",{onClick:()=>_(e.id),className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded hover:bg-red-100",children:(0,a.jsx)(n.Z,{className:"w-3 h-3"})})]})})]})},e.id)),0===m.length&&(0,a.jsx)(c.SC,{children:(0,a.jsx)(c.pj,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),d&&(0,a.jsxs)(c.Zb,{children:[(0,a.jsx)(c.Dx,{className:"mb-4",children:"Configuration Example"}),(0,a.jsx)(c.xv,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,a.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,a.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(N).length?(0,a.jsxs)("span",{className:"text-gray-500",children:[(0,a.jsx)("br",{}),"\xa0\xa0# No aliases configured yet"]}):Object.entries(N).map(e=>{let[s,l]=e;return(0,a.jsxs)("span",{children:[(0,a.jsx)("br",{}),'\xa0\xa0"',s,'": "',l,'"']},s)})]})})]})]})}},2597:function(e,s,l){"use strict";var a=l(57437);l(2265);var t=l(92280),r=l(54507);s.Z=function(e){let{value:s,onChange:l,premiumUser:i=!1,disabledCallbacks:n=[],onDisabledCallbacksChange:c}=e;return i?(0,a.jsx)(r.Z,{value:s,onChange:l,disabledCallbacks:n,onDisabledCallbacksChange:c}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,a.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,a.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,a.jsxs)(t.x,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,a.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}},65925:function(e,s,l){"use strict";l.d(s,{m:function(){return i}});var a=l(57437);l(2265);var t=l(52787);let{Option:r}=t.default,i=e=>e?({"24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set";s.Z=e=>{let{value:s,onChange:l,className:i="",style:n={}}=e;return(0,a.jsxs)(t.default,{style:{width:"100%",...n},value:s||void 0,onChange:l,className:i,placeholder:"n/a",children:[(0,a.jsx)(r,{value:"24h",children:"daily"}),(0,a.jsx)(r,{value:"7d",children:"weekly"}),(0,a.jsx)(r,{value:"30d",children:"monthly"})]})}},39210:function(e,s,l){"use strict";l.d(s,{Z:function(){return t}});var a=l(19250);let t=async(e,s,l,t,r)=>{let i;i="Admin"!=l&&"Admin Viewer"!=l?await (0,a.teamListCall)(e,(null==t?void 0:t.organization_id)||null,s):await (0,a.teamListCall)(e,(null==t?void 0:t.organization_id)||null),console.log("givenTeams: ".concat(i)),r(i)}},27799:function(e,s,l){"use strict";var a=l(57437);l(2265);var t=l(40728),r=l(82182),i=l(91777),n=l(97434);s.Z=function(e){let{loggingConfigs:s=[],disabledCallbacks:l=[],variant:c="card",className:o=""}=e,d=e=>{var s;return(null===(s=Object.entries(n.Lo).find(s=>{let[l,a]=s;return a===e}))||void 0===s?void 0:s[0])||e},m=e=>{switch(e){case"success":return"green";case"failure":return"red";case"success_and_failure":return"blue";default:return"gray"}},x=e=>{switch(e){case"success":return"Success Only";case"failure":return"Failure Only";case"success_and_failure":return"Success & Failure";default:return e}},u=(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(r.Z,{className:"h-4 w-4 text-blue-600"}),(0,a.jsx)(t.x,{className:"font-semibold text-gray-900",children:"Logging Integrations"}),(0,a.jsx)(t.C,{color:"blue",size:"xs",children:s.length})]}),s.length>0?(0,a.jsx)("div",{className:"space-y-3",children:s.map((e,s)=>{var l;let i=d(e.callback_name),c=null===(l=n.Dg[i])||void 0===l?void 0:l.logo;return(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[c?(0,a.jsx)("img",{src:c,alt:i,className:"w-5 h-5 object-contain"}):(0,a.jsx)(r.Z,{className:"h-5 w-5 text-gray-400"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(t.x,{className:"font-medium text-blue-800",children:i}),(0,a.jsxs)(t.x,{className:"text-xs text-blue-600",children:[Object.keys(e.callback_vars).length," parameters configured"]})]})]}),(0,a.jsx)(t.C,{color:m(e.callback_type),size:"sm",children:x(e.callback_type)})]},s)})}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,a.jsx)(r.Z,{className:"h-4 w-4 text-gray-400"}),(0,a.jsx)(t.x,{className:"text-gray-500 text-sm",children:"No logging integrations configured"})]})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 text-red-600"}),(0,a.jsx)(t.x,{className:"font-semibold text-gray-900",children:"Disabled Callbacks"}),(0,a.jsx)(t.C,{color:"red",size:"xs",children:l.length})]}),l.length>0?(0,a.jsx)("div",{className:"space-y-3",children:l.map((e,s)=>{var l;let r=n.RD[e]||e,c=null===(l=n.Dg[r])||void 0===l?void 0:l.logo;return(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-red-50 border border-red-200",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[c?(0,a.jsx)("img",{src:c,alt:r,className:"w-5 h-5 object-contain"}):(0,a.jsx)(i.Z,{className:"h-5 w-5 text-gray-400"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(t.x,{className:"font-medium text-red-800",children:r}),(0,a.jsx)(t.x,{className:"text-xs text-red-600",children:"Disabled for this key"})]})]}),(0,a.jsx)(t.C,{color:"red",size:"sm",children:"Disabled"})]},s)})}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 text-gray-400"}),(0,a.jsx)(t.x,{className:"text-gray-500 text-sm",children:"No callbacks disabled"})]})]})]});return"card"===c?(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(o),children:[(0,a.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(t.x,{className:"font-semibold text-gray-900",children:"Logging Settings"}),(0,a.jsx)(t.x,{className:"text-xs text-gray-500",children:"Active logging integrations and disabled callbacks for this key"})]})}),u]}):(0,a.jsxs)("div",{className:"".concat(o),children:[(0,a.jsx)(t.x,{className:"font-medium text-gray-900 mb-3",children:"Logging Settings"}),u]})}},98015:function(e,s,l){"use strict";l.d(s,{Z:function(){return g}});var a=l(57437),t=l(2265),r=l(92280),i=l(40728),n=l(79814),c=l(19250),o=function(e){let{vectorStores:s,accessToken:l}=e,[r,o]=(0,t.useState)([]);(0,t.useEffect)(()=>{(async()=>{if(l&&0!==s.length)try{let e=await (0,c.vectorStoreListCall)(l);e.data&&o(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[l,s.length]);let d=e=>{let s=r.find(s=>s.vector_store_id===e);return s?"".concat(s.vector_store_name||s.vector_store_id," (").concat(s.vector_store_id,")"):e};return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.Z,{className:"h-4 w-4 text-blue-600"}),(0,a.jsx)(i.x,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,a.jsx)(i.C,{color:"blue",size:"xs",children:s.length})]}),s.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map((e,s)=>(0,a.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:d(e)},s))}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,a.jsx)(n.Z,{className:"h-4 w-4 text-gray-400"}),(0,a.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},d=l(25327),m=l(86462),x=l(47686),u=l(89970),h=function(e){let{mcpServers:s,mcpAccessGroups:r=[],mcpToolPermissions:n={},accessToken:o}=e,[h,g]=(0,t.useState)([]),[p,j]=(0,t.useState)([]),[f,b]=(0,t.useState)(new Set),v=e=>{b(s=>{let l=new Set(s);return l.has(e)?l.delete(e):l.add(e),l})};(0,t.useEffect)(()=>{(async()=>{if(o&&s.length>0)try{let e=await (0,c.fetchMCPServers)(o);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[o,s.length]),(0,t.useEffect)(()=>{(async()=>{if(o&&r.length>0)try{let e=await Promise.resolve().then(l.bind(l,19250)).then(e=>e.fetchMCPAccessGroups(o));j(Array.isArray(e)?e:e.data||[])}catch(e){console.error("Error fetching MCP access groups:",e)}})()},[o,r.length]);let y=e=>{let s=h.find(s=>s.server_id===e);if(s){let l=e.length>7?"".concat(e.slice(0,3),"...").concat(e.slice(-4)):e;return"".concat(s.alias," (").concat(l,")")}return e},_=e=>e,N=[...s.map(e=>({type:"server",value:e})),...r.map(e=>({type:"accessGroup",value:e}))],w=N.length;return(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(d.Z,{className:"h-4 w-4 text-blue-600"}),(0,a.jsx)(i.x,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,a.jsx)(i.C,{color:"blue",size:"xs",children:w})]}),w>0?(0,a.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:N.map((e,s)=>{let l="server"===e.type?n[e.value]:void 0,t=l&&l.length>0,r=f.has(e.value);return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{onClick:()=>t&&v(e.value),className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ".concat(t?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"),children:[(0,a.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,a.jsx)(u.Z,{title:"Full ID: ".concat(e.value),placement:"top",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,a.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:y(e.value)})]})}):(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,a.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full flex-shrink-0"}),(0,a.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:_(e.value)}),(0,a.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded uppercase tracking-wide flex-shrink-0",children:"Group"})]})}),t&&(0,a.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0 whitespace-nowrap",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-gray-600",children:l.length}),(0,a.jsx)("span",{className:"text-xs text-gray-500",children:1===l.length?"tool":"tools"}),r?(0,a.jsx)(m.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,a.jsx)(x.Z,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),t&&r&&(0,a.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:l.map((e,s)=>(0,a.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},s))})})]},s)})}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,a.jsx)(d.Z,{className:"h-4 w-4 text-gray-400"}),(0,a.jsx)(i.x,{className:"text-gray-500 text-sm",children:"No MCP servers or access groups configured"})]})]})},g=function(e){let{objectPermission:s,variant:l="card",className:t="",accessToken:i}=e,n=(null==s?void 0:s.vector_stores)||[],c=(null==s?void 0:s.mcp_servers)||[],d=(null==s?void 0:s.mcp_access_groups)||[],m=(null==s?void 0:s.mcp_tool_permissions)||{},x=(0,a.jsxs)("div",{className:"card"===l?"grid grid-cols-1 md:grid-cols-2 gap-6":"space-y-4",children:[(0,a.jsx)(o,{vectorStores:n,accessToken:i}),(0,a.jsx)(h,{mcpServers:c,mcpAccessGroups:d,mcpToolPermissions:m,accessToken:i})]});return"card"===l?(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 ".concat(t),children:[(0,a.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,a.jsxs)("div",{children:[(0,a.jsx)(r.x,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,a.jsx)(r.x,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),x]}):(0,a.jsxs)("div",{className:"".concat(t),children:[(0,a.jsx)(r.x,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}},21425:function(e,s,l){"use strict";var a=l(57437);l(2265);var t=l(54507);s.Z=e=>{let{value:s,onChange:l,disabledCallbacks:r=[],onDisabledCallbacksChange:i}=e;return(0,a.jsx)(t.Z,{value:s,onChange:l,disabledCallbacks:r,onDisabledCallbacksChange:i})}},918:function(e,s,l){"use strict";var a=l(57437),t=l(2265),r=l(62490),i=l(19250),n=l(9114);s.Z=e=>{let{accessToken:s,userID:l}=e,[c,o]=(0,t.useState)([]);(0,t.useEffect)(()=>{(async()=>{if(s&&l)try{let e=await (0,i.availableTeamListCall)(s);o(e)}catch(e){console.error("Error fetching available teams:",e)}})()},[s,l]);let d=async e=>{if(s&&l)try{await (0,i.teamMemberAddCall)(s,e,{user_id:l,role:"user"}),n.Z.success("Successfully joined team"),o(s=>s.filter(s=>s.team_id!==e))}catch(e){console.error("Error joining team:",e),n.Z.fromBackend("Failed to join team")}};return(0,a.jsx)(r.Zb,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,a.jsxs)(r.iA,{children:[(0,a.jsx)(r.ss,{children:(0,a.jsxs)(r.SC,{children:[(0,a.jsx)(r.xs,{children:"Team Name"}),(0,a.jsx)(r.xs,{children:"Description"}),(0,a.jsx)(r.xs,{children:"Members"}),(0,a.jsx)(r.xs,{children:"Models"}),(0,a.jsx)(r.xs,{children:"Actions"})]})}),(0,a.jsxs)(r.RM,{children:[c.map(e=>(0,a.jsxs)(r.SC,{children:[(0,a.jsx)(r.pj,{children:(0,a.jsx)(r.xv,{children:e.team_alias})}),(0,a.jsx)(r.pj,{children:(0,a.jsx)(r.xv,{children:e.description||"No description available"})}),(0,a.jsx)(r.pj,{children:(0,a.jsxs)(r.xv,{children:[e.members_with_roles.length," members"]})}),(0,a.jsx)(r.pj,{children:(0,a.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,s)=>(0,a.jsx)(r.Ct,{size:"xs",className:"mb-1",color:"blue",children:(0,a.jsx)(r.xv,{children:e.length>30?"".concat(e.slice(0,30),"..."):e})},s)):(0,a.jsx)(r.Ct,{size:"xs",color:"red",children:(0,a.jsx)(r.xv,{children:"All Proxy Models"})})})}),(0,a.jsx)(r.pj,{children:(0,a.jsx)(r.zx,{size:"xs",variant:"secondary",onClick:()=>d(e.team_id),children:"Join Team"})})]},e.team_id)),0===c.length&&(0,a.jsx)(r.SC,{children:(0,a.jsx)(r.pj,{colSpan:5,className:"text-center",children:(0,a.jsx)(r.xv,{children:"No available teams to join"})})})]})]})})}},33304:function(e,s,l){"use strict";function a(e){return""===e?null:e}l.d(s,{C:function(){return a}})}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2284,7908,9678,8714,7281,3310,8049,131,2004,2012,2971,2117,1744],function(){return e(e.s=77403)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/test-key/page-d460fe80920627a2.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/test-key/page-07801bcd0ac75c02.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/test-key/page-d460fe80920627a2.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/test-key/page-07801bcd0ac75c02.js index 5cb5666fb40..b917c5ea655 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/test-key/page-d460fe80920627a2.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/test-key/page-07801bcd0ac75c02.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2322],{35831:function(e,n,t){Promise.resolve().then(t.bind(t,38511))},38434:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={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 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},77565:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={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"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},69993:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},57400:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={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"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},15883:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={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"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},96761:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var a=t(5853),i=t(26898),o=t(97324),r=t(1153),s=t(2265);let l=s.forwardRef((e,n)=>{let{color:t,children:l,className:p}=e,c=(0,a._T)(e,["color","children","className"]);return s.createElement("p",Object.assign({ref:n,className:(0,o.q)("font-medium text-tremor-title",t?(0,r.bM)(t,i.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",p)},c),l)});l.displayName="Title"},92280:function(e,n,t){"use strict";t.d(n,{x:function(){return a.Z}});var a=t(84264)},39760:function(e,n,t){"use strict";var a=t(2265),i=t(99376),o=t(14474),r=t(3914);n.Z=()=>{var e,n,t,s,l,p,c;let m=(0,i.useRouter)(),u="undefined"!=typeof document?(0,r.e)("token"):null;(0,a.useEffect)(()=>{u||m.replace("/sso/key/generate")},[u,m]);let d=(0,a.useMemo)(()=>{if(!u)return null;try{return(0,o.o)(u)}catch(e){return(0,r.b)(),m.replace("/sso/key/generate"),null}},[u,m]);return{token:u,accessToken:null!==(e=null==d?void 0:d.key)&&void 0!==e?e:null,userId:null!==(n=null==d?void 0:d.user_id)&&void 0!==n?n:null,userEmail:null!==(t=null==d?void 0:d.user_email)&&void 0!==t?t:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(s=null==d?void 0:d.user_role)&&void 0!==s?s:null),premiumUser:null!==(l=null==d?void 0:d.premium_user)&&void 0!==l?l:null,disabledPersonalKeyCreation:null!==(p=null==d?void 0:d.disabled_non_admin_personal_key_creation)&&void 0!==p?p:null,showSSOBanner:(null==d?void 0:d.login_method)==="username_password"}}},38511:function(e,n,t){"use strict";t.r(n);var a=t(57437),i=t(13240),o=t(39760);n.default=()=>{let{token:e,accessToken:n,userRole:t,userId:r,disabledPersonalKeyCreation:s}=(0,o.Z)();return(0,a.jsx)(i.Z,{accessToken:n,token:e,userRole:t,userID:r,disabledPersonalKeyCreation:s})}},88658:function(e,n,t){"use strict";t.d(n,{L:function(){return i}});var a=t(49817);let i=e=>{let n;let{apiKeySource:t,accessToken:i,apiKey:o,inputMessage:r,chatHistory:s,selectedTags:l,selectedVectorStores:p,selectedGuardrails:c,selectedMCPTools:m,endpointType:u,selectedModel:d,selectedSdk:g}=e,_="session"===t?i:o,f=window.location.origin,h=r||"Your prompt here",b=h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),v=s.filter(e=>!e.isImage).map(e=>{let{role:n,content:t}=e;return{role:n,content:t}}),y={};l.length>0&&(y.tags=l),p.length>0&&(y.vector_stores=p),c.length>0&&(y.guardrails=c);let w=d||"your-model-name",x="azure"===g?'import openai\n\nclient = openai.AzureOpenAI(\n api_key="'.concat(_||"YOUR_LITELLM_API_KEY",'",\n azure_endpoint="').concat(f,'",\n api_version="2024-02-01"\n)'):'import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(_||"YOUR_LITELLM_API_KEY",'",\n base_url="').concat(f,'"\n)');switch(u){case a.KP.CHAT:{let e=Object.keys(y).length>0,t="";if(e){let e=JSON.stringify({metadata:y},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();t=",\n extra_body=".concat(e)}let a=v.length>0?v:[{role:"user",content:h}];n='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.chat.completions.create(\n model="'.concat(w,'",\n messages=').concat(JSON.stringify(a,null,4)).concat(t,'\n)\n\nprint(response)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.chat.completions.create(\n# model="').concat(w,'",\n# messages=[\n# {\n# "role": "user",\n# "content": [\n# {\n# "type": "text",\n# "text": "').concat(b,'"\n# },\n# {\n# "type": "image_url",\n# "image_url": {\n# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file}\n# }\n# }\n# ]\n# }\n# ]').concat(t,"\n# )\n# print(response_with_file)\n");break}case a.KP.RESPONSES:{let e=Object.keys(y).length>0,t="";if(e){let e=JSON.stringify({metadata:y},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();t=",\n extra_body=".concat(e)}let a=v.length>0?v:[{role:"user",content:h}];n='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.responses.create(\n model="'.concat(w,'",\n input=').concat(JSON.stringify(a,null,4)).concat(t,'\n)\n\nprint(response.output_text)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.responses.create(\n# model="').concat(w,'",\n# input=[\n# {\n# "role": "user",\n# "content": [\n# {"type": "input_text", "text": "').concat(b,'"},\n# {\n# "type": "input_image",\n# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file}\n# },\n# ],\n# }\n# ]').concat(t,"\n# )\n# print(response_with_file.output_text)\n");break}case a.KP.IMAGE:n="azure"===g?"\n# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI.\n# This snippet uses 'client.images.generate' and will create a new image based on your prompt.\n# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context.\nimport os\nimport requests\nimport json\nimport time\nfrom PIL import Image\n\nresult = client.images.generate(\n model=\"".concat(w,'",\n prompt="').concat(r,'",\n n=1\n)\n\njson_response = json.loads(result.model_dump_json())\n\n# Set the directory for the stored image\nimage_dir = os.path.join(os.curdir, \'images\')\n\n# If the directory doesn\'t exist, create it\nif not os.path.isdir(image_dir):\n os.mkdir(image_dir)\n\n# Initialize the image path\nimage_filename = f"generated_image_{int(time.time())}.png"\nimage_path = os.path.join(image_dir, image_filename)\n\ntry:\n # Retrieve the generated image\n if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"):\n image_url = json_response["data"][0]["url"]\n generated_image = requests.get(image_url).content\n with open(image_path, "wb") as image_file:\n image_file.write(generated_image)\n\n print(f"Image saved to {image_path}")\n # Display the image\n image = Image.open(image_path)\n image.show()\n else:\n print("Could not find image URL in response.")\n print("Full response:", json_response)\nexcept Exception as e:\n print(f"An error occurred: {e}")\n print("Full response:", json_response)\n'):"\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(b,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(w,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.IMAGE_EDITS:n="azure"===g?'\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# The prompt entered by the user\nprompt = "'.concat(b,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(w,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n'):"\nimport base64\nimport os\nimport time\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(b,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(w,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.EMBEDDINGS:n='\nresponse = client.embeddings.create(\n input="'.concat(r||"Your string here",'",\n model="').concat(w,'",\n encoding_format="base64" # or "float"\n)\n\nprint(response.data[0].embedding)\n');break;default:n="\n# Code generation for this endpoint is not implemented yet."}return"".concat(x,"\n").concat(n)}},51601:function(e,n,t){"use strict";t.d(n,{p:function(){return i}});var a=t(19250);let i=async e=>{try{let n=await (0,a.modelHubCall)(e);if(console.log("model_info:",n),(null==n?void 0:n.data.length)>0){let e=n.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,n)=>e.model_group.localeCompare(n.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}},49817:function(e,n,t){"use strict";var a,i,o,r;t.d(n,{KP:function(){return i},vf:function(){return l}}),(o=a||(a={})).IMAGE_GENERATION="image_generation",o.CHAT="chat",o.RESPONSES="responses",o.IMAGE_EDITS="image_edits",o.ANTHROPIC_MESSAGES="anthropic_messages",(r=i||(i={})).IMAGE="image",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",r.EMBEDDINGS="embeddings";let s={image_generation:"image",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages"},l=e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let n=s[e];return console.log("endpointType:",n),n}return"chat"}},67479:function(e,n,t){"use strict";var a=t(57437),i=t(2265),o=t(52787),r=t(19250);n.Z=e=>{let{onChange:n,value:t,className:s,accessToken:l,disabled:p}=e,[c,m]=(0,i.useState)([]),[u,d]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{(async()=>{if(l){d(!0);try{let e=await (0,r.getGuardrailsList)(l);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),m(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{d(!1)}}})()},[l]),(0,a.jsx)("div",{children:(0,a.jsx)(o.default,{mode:"multiple",disabled:p,placeholder:p?"Setting guardrails is a premium feature.":"Select guardrails",onChange:e=>{console.log("Selected guardrails:",e),n(e)},value:t,loading:u,className:s,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:"".concat(e.guardrail_name),value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}},97415:function(e,n,t){"use strict";var a=t(57437),i=t(2265),o=t(52787),r=t(19250);n.Z=e=>{let{onChange:n,value:t,className:s,accessToken:l,placeholder:p="Select vector stores",disabled:c=!1}=e,[m,u]=(0,i.useState)([]),[d,g]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{(async()=>{if(l){g(!0);try{let e=await (0,r.vectorStoreListCall)(l);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{g(!1)}}})()},[l]),(0,a.jsx)("div",{children:(0,a.jsx)(o.default,{mode:"multiple",placeholder:p,onChange:n,value:t,loading:d,className:s,options:m.map(e=>({label:"".concat(e.vector_store_name||e.vector_store_id," (").concat(e.vector_store_id,")"),value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}}},function(e){e.O(0,[1114,1491,4556,2417,3709,9775,7908,9011,5319,7906,4851,6433,9888,8049,3240,2971,2117,1744],function(){return e(e.s=35831)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2322],{35831:function(e,n,t){Promise.resolve().then(t.bind(t,38511))},38434:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={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 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},77565:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={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"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},69993:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 328a60 60 0 10120 0 60 60 0 10-120 0zM852 64H172c-17.7 0-32 14.3-32 32v660c0 17.7 14.3 32 32 32h680c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-32 660H204V128h616v596zM604 328a60 60 0 10120 0 60 60 0 10-120 0zm250.2 556H169.8c-16.5 0-29.8 14.3-29.8 32v36c0 4.4 3.3 8 7.4 8h729.1c4.1 0 7.4-3.6 7.4-8v-36c.1-17.7-13.2-32-29.7-32zM664 508H360c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"robot",theme:"outlined"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},57400:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={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"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},15883:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var a=t(1119),i=t(2265),o={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"},r=t(55015),s=i.forwardRef(function(e,n){return i.createElement(r.Z,(0,a.Z)({},e,{ref:n,icon:o}))})},96761:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var a=t(5853),i=t(26898),o=t(97324),r=t(1153),s=t(2265);let l=s.forwardRef((e,n)=>{let{color:t,children:l,className:p}=e,c=(0,a._T)(e,["color","children","className"]);return s.createElement("p",Object.assign({ref:n,className:(0,o.q)("font-medium text-tremor-title",t?(0,r.bM)(t,i.K.darkText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",p)},c),l)});l.displayName="Title"},92280:function(e,n,t){"use strict";t.d(n,{x:function(){return a.Z}});var a=t(84264)},80443:function(e,n,t){"use strict";var a=t(2265),i=t(99376),o=t(14474),r=t(3914);n.Z=()=>{var e,n,t,s,l,p,c;let m=(0,i.useRouter)(),u="undefined"!=typeof document?(0,r.e)("token"):null;(0,a.useEffect)(()=>{u||m.replace("/sso/key/generate")},[u,m]);let d=(0,a.useMemo)(()=>{if(!u)return null;try{return(0,o.o)(u)}catch(e){return(0,r.b)(),m.replace("/sso/key/generate"),null}},[u,m]);return{token:u,accessToken:null!==(e=null==d?void 0:d.key)&&void 0!==e?e:null,userId:null!==(n=null==d?void 0:d.user_id)&&void 0!==n?n:null,userEmail:null!==(t=null==d?void 0:d.user_email)&&void 0!==t?t:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(s=null==d?void 0:d.user_role)&&void 0!==s?s:null),premiumUser:null!==(l=null==d?void 0:d.premium_user)&&void 0!==l?l:null,disabledPersonalKeyCreation:null!==(p=null==d?void 0:d.disabled_non_admin_personal_key_creation)&&void 0!==p?p:null,showSSOBanner:(null==d?void 0:d.login_method)==="username_password"}}},38511:function(e,n,t){"use strict";t.r(n);var a=t(57437),i=t(13240),o=t(80443);n.default=()=>{let{token:e,accessToken:n,userRole:t,userId:r,disabledPersonalKeyCreation:s}=(0,o.Z)();return(0,a.jsx)(i.Z,{accessToken:n,token:e,userRole:t,userID:r,disabledPersonalKeyCreation:s})}},88658:function(e,n,t){"use strict";t.d(n,{L:function(){return i}});var a=t(49817);let i=e=>{let n;let{apiKeySource:t,accessToken:i,apiKey:o,inputMessage:r,chatHistory:s,selectedTags:l,selectedVectorStores:p,selectedGuardrails:c,selectedMCPTools:m,endpointType:u,selectedModel:d,selectedSdk:g}=e,_="session"===t?i:o,f=window.location.origin,h=r||"Your prompt here",b=h.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n"),v=s.filter(e=>!e.isImage).map(e=>{let{role:n,content:t}=e;return{role:n,content:t}}),y={};l.length>0&&(y.tags=l),p.length>0&&(y.vector_stores=p),c.length>0&&(y.guardrails=c);let w=d||"your-model-name",x="azure"===g?'import openai\n\nclient = openai.AzureOpenAI(\n api_key="'.concat(_||"YOUR_LITELLM_API_KEY",'",\n azure_endpoint="').concat(f,'",\n api_version="2024-02-01"\n)'):'import openai\n\nclient = openai.OpenAI(\n api_key="'.concat(_||"YOUR_LITELLM_API_KEY",'",\n base_url="').concat(f,'"\n)');switch(u){case a.KP.CHAT:{let e=Object.keys(y).length>0,t="";if(e){let e=JSON.stringify({metadata:y},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();t=",\n extra_body=".concat(e)}let a=v.length>0?v:[{role:"user",content:h}];n='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.chat.completions.create(\n model="'.concat(w,'",\n messages=').concat(JSON.stringify(a,null,4)).concat(t,'\n)\n\nprint(response)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.chat.completions.create(\n# model="').concat(w,'",\n# messages=[\n# {\n# "role": "user",\n# "content": [\n# {\n# "type": "text",\n# "text": "').concat(b,'"\n# },\n# {\n# "type": "image_url",\n# "image_url": {\n# "url": f"data:image/jpeg;base64,{base64_file}" # or data:application/pdf;base64,{base64_file}\n# }\n# }\n# ]\n# }\n# ]').concat(t,"\n# )\n# print(response_with_file)\n");break}case a.KP.RESPONSES:{let e=Object.keys(y).length>0,t="";if(e){let e=JSON.stringify({metadata:y},null,2).split("\n").map(e=>" ".repeat(4)+e).join("\n").trim();t=",\n extra_body=".concat(e)}let a=v.length>0?v:[{role:"user",content:h}];n='\nimport base64\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# Example with text only\nresponse = client.responses.create(\n model="'.concat(w,'",\n input=').concat(JSON.stringify(a,null,4)).concat(t,'\n)\n\nprint(response.output_text)\n\n# Example with image or PDF (uncomment and provide file path to use)\n# base64_file = encode_image("path/to/your/file.jpg") # or .pdf\n# response_with_file = client.responses.create(\n# model="').concat(w,'",\n# input=[\n# {\n# "role": "user",\n# "content": [\n# {"type": "input_text", "text": "').concat(b,'"},\n# {\n# "type": "input_image",\n# "image_url": f"data:image/jpeg;base64,{base64_file}", # or data:application/pdf;base64,{base64_file}\n# },\n# ],\n# }\n# ]').concat(t,"\n# )\n# print(response_with_file.output_text)\n");break}case a.KP.IMAGE:n="azure"===g?"\n# NOTE: The Azure SDK does not have a direct equivalent to the multi-modal 'responses.create' method shown for OpenAI.\n# This snippet uses 'client.images.generate' and will create a new image based on your prompt.\n# It does not use the uploaded image, as 'client.images.generate' does not support image inputs in this context.\nimport os\nimport requests\nimport json\nimport time\nfrom PIL import Image\n\nresult = client.images.generate(\n model=\"".concat(w,'",\n prompt="').concat(r,'",\n n=1\n)\n\njson_response = json.loads(result.model_dump_json())\n\n# Set the directory for the stored image\nimage_dir = os.path.join(os.curdir, \'images\')\n\n# If the directory doesn\'t exist, create it\nif not os.path.isdir(image_dir):\n os.mkdir(image_dir)\n\n# Initialize the image path\nimage_filename = f"generated_image_{int(time.time())}.png"\nimage_path = os.path.join(image_dir, image_filename)\n\ntry:\n # Retrieve the generated image\n if json_response.get("data") && len(json_response["data"]) > 0 && json_response["data"][0].get("url"):\n image_url = json_response["data"][0]["url"]\n generated_image = requests.get(image_url).content\n with open(image_path, "wb") as image_file:\n image_file.write(generated_image)\n\n print(f"Image saved to {image_path}")\n # Display the image\n image = Image.open(image_path)\n image.show()\n else:\n print("Could not find image URL in response.")\n print("Full response:", json_response)\nexcept Exception as e:\n print(f"An error occurred: {e}")\n print("Full response:", json_response)\n'):"\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(b,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(w,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.IMAGE_EDITS:n="azure"===g?'\nimport base64\nimport os\nimport time\nimport json\nfrom PIL import Image\nimport requests\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, "rb") as image_file:\n return base64.b64encode(image_file.read()).decode(\'utf-8\')\n\n# The prompt entered by the user\nprompt = "'.concat(b,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(w,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n'):"\nimport base64\nimport os\nimport time\n\n# Helper function to encode images to base64\ndef encode_image(image_path):\n with open(image_path, \"rb\") as image_file:\n return base64.b64encode(image_file.read()).decode('utf-8')\n\n# Helper function to create a file (simplified for this example)\ndef create_file(image_path):\n # In a real implementation, this would upload the file to OpenAI\n # For this example, we'll just return a placeholder ID\n return f\"file_{os.path.basename(image_path).replace('.', '_')}\"\n\n# The prompt entered by the user\nprompt = \"".concat(b,'"\n\n# Encode images to base64\nbase64_image1 = encode_image("body-lotion.png")\nbase64_image2 = encode_image("soap.png")\n\n# Create file IDs\nfile_id1 = create_file("body-lotion.png")\nfile_id2 = create_file("incense-kit.png")\n\nresponse = client.responses.create(\n model="').concat(w,'",\n input=[\n {\n "role": "user",\n "content": [\n {"type": "input_text", "text": prompt},\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image1}",\n },\n {\n "type": "input_image",\n "image_url": f"data:image/jpeg;base64,{base64_image2}",\n },\n {\n "type": "input_image",\n "file_id": file_id1,\n },\n {\n "type": "input_image",\n "file_id": file_id2,\n }\n ],\n }\n ],\n tools=[{"type": "image_generation"}],\n)\n\n# Process the response\nimage_generation_calls = [\n output\n for output in response.output\n if output.type == "image_generation_call"\n]\n\nimage_data = [output.result for output in image_generation_calls]\n\nif image_data:\n image_base64 = image_data[0]\n image_filename = f"edited_image_{int(time.time())}.png"\n with open(image_filename, "wb") as f:\n f.write(base64.b64decode(image_base64))\n print(f"Image saved to {image_filename}")\nelse:\n # If no image is generated, there might be a text response with an explanation\n text_response = [output.text for output in response.output if hasattr(output, \'text\')]\n if text_response:\n print("No image generated. Model response:")\n print("\\n".join(text_response))\n else:\n print("No image data found in response.")\n print("Full response for debugging:")\n print(response)\n');break;case a.KP.EMBEDDINGS:n='\nresponse = client.embeddings.create(\n input="'.concat(r||"Your string here",'",\n model="').concat(w,'",\n encoding_format="base64" # or "float"\n)\n\nprint(response.data[0].embedding)\n');break;default:n="\n# Code generation for this endpoint is not implemented yet."}return"".concat(x,"\n").concat(n)}},51601:function(e,n,t){"use strict";t.d(n,{p:function(){return i}});var a=t(19250);let i=async e=>{try{let n=await (0,a.modelHubCall)(e);if(console.log("model_info:",n),(null==n?void 0:n.data.length)>0){let e=n.data.map(e=>({model_group:e.model_group,mode:null==e?void 0:e.mode}));return e.sort((e,n)=>e.model_group.localeCompare(n.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}}},49817:function(e,n,t){"use strict";var a,i,o,r;t.d(n,{KP:function(){return i},vf:function(){return l}}),(o=a||(a={})).IMAGE_GENERATION="image_generation",o.CHAT="chat",o.RESPONSES="responses",o.IMAGE_EDITS="image_edits",o.ANTHROPIC_MESSAGES="anthropic_messages",(r=i||(i={})).IMAGE="image",r.CHAT="chat",r.RESPONSES="responses",r.IMAGE_EDITS="image_edits",r.ANTHROPIC_MESSAGES="anthropic_messages",r.EMBEDDINGS="embeddings";let s={image_generation:"image",chat:"chat",responses:"responses",image_edits:"image_edits",anthropic_messages:"anthropic_messages"},l=e=>{if(console.log("getEndpointType:",e),Object.values(a).includes(e)){let n=s[e];return console.log("endpointType:",n),n}return"chat"}},67479:function(e,n,t){"use strict";var a=t(57437),i=t(2265),o=t(52787),r=t(19250);n.Z=e=>{let{onChange:n,value:t,className:s,accessToken:l,disabled:p}=e,[c,m]=(0,i.useState)([]),[u,d]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{(async()=>{if(l){d(!0);try{let e=await (0,r.getGuardrailsList)(l);console.log("Guardrails response:",e),e.guardrails&&(console.log("Guardrails data:",e.guardrails),m(e.guardrails))}catch(e){console.error("Error fetching guardrails:",e)}finally{d(!1)}}})()},[l]),(0,a.jsx)("div",{children:(0,a.jsx)(o.default,{mode:"multiple",disabled:p,placeholder:p?"Setting guardrails is a premium feature.":"Select guardrails",onChange:e=>{console.log("Selected guardrails:",e),n(e)},value:t,loading:u,className:s,options:c.map(e=>(console.log("Mapping guardrail:",e),{label:"".concat(e.guardrail_name),value:e.guardrail_name})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"}})})}},97415:function(e,n,t){"use strict";var a=t(57437),i=t(2265),o=t(52787),r=t(19250);n.Z=e=>{let{onChange:n,value:t,className:s,accessToken:l,placeholder:p="Select vector stores",disabled:c=!1}=e,[m,u]=(0,i.useState)([]),[d,g]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{(async()=>{if(l){g(!0);try{let e=await (0,r.vectorStoreListCall)(l);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{g(!1)}}})()},[l]),(0,a.jsx)("div",{children:(0,a.jsx)(o.default,{mode:"multiple",placeholder:p,onChange:n,value:t,loading:d,className:s,options:m.map(e=>({label:"".concat(e.vector_store_name||e.vector_store_id," (").concat(e.vector_store_id,")"),value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:c})})}}},function(e){e.O(0,[1114,1491,4556,2417,3709,9775,7908,9011,5319,7906,4851,6433,9888,8049,3240,2971,2117,1744],function(){return e(e.s=35831)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/mcp-servers/page-3fbfc3ba4ccd0398.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/mcp-servers/page-ec7a6ad1cdc85e11.js similarity index 98% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/mcp-servers/page-3fbfc3ba4ccd0398.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/mcp-servers/page-ec7a6ad1cdc85e11.js index fef67f6ed85..c00b2cf4559 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/mcp-servers/page-3fbfc3ba4ccd0398.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/mcp-servers/page-ec7a6ad1cdc85e11.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6940],{61621:function(e,r,n){Promise.resolve().then(n.bind(n,45045))},36724:function(e,r,n){"use strict";n.d(r,{Dx:function(){return i.Z},Zb:function(){return o.Z},xv:function(){return l.Z},zx:function(){return t.Z}});var t=n(20831),o=n(12514),l=n(84264),i=n(96761)},64504:function(e,r,n){"use strict";n.d(r,{o:function(){return o.Z},z:function(){return t.Z}});var t=n(20831),o=n(49566)},19130:function(e,r,n){"use strict";n.d(r,{RM:function(){return o.Z},SC:function(){return c.Z},iA:function(){return t.Z},pj:function(){return l.Z},ss:function(){return i.Z},xs:function(){return u.Z}});var t=n(21626),o=n(97214),l=n(28241),i=n(58834),u=n(69552),c=n(71876)},92280:function(e,r,n){"use strict";n.d(r,{x:function(){return t.Z}});var t=n(84264)},39760:function(e,r,n){"use strict";var t=n(2265),o=n(99376),l=n(14474),i=n(3914);r.Z=()=>{var e,r,n,u,c,s,a;let d=(0,o.useRouter)(),f="undefined"!=typeof document?(0,i.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let m=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,l.o)(f)}catch(e){return(0,i.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==m?void 0:m.key)&&void 0!==e?e:null,userId:null!==(r=null==m?void 0:m.user_id)&&void 0!==r?r:null,userEmail:null!==(n=null==m?void 0:m.user_email)&&void 0!==n?n:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(u=null==m?void 0:m.user_role)&&void 0!==u?u:null),premiumUser:null!==(c=null==m?void 0:m.premium_user)&&void 0!==c?c:null,disabledPersonalKeyCreation:null!==(s=null==m?void 0:m.disabled_non_admin_personal_key_creation)&&void 0!==s?s:null,showSSOBanner:(null==m?void 0:m.login_method)==="username_password"}}},45045:function(e,r,n){"use strict";n.r(r);var t=n(57437),o=n(94138),l=n(39760),i=n(21623),u=n(29827);r.default=()=>{let{accessToken:e,userRole:r,userId:n}=(0,l.Z)(),c=new i.S;return(0,t.jsx)(u.aH,{client:c,children:(0,t.jsx)(o.d,{accessToken:e,userRole:r,userID:n})})}},29488:function(e,r,n){"use strict";n.d(r,{Hc:function(){return i},Ui:function(){return l},e4:function(){return u},xd:function(){return c}});let t="litellm_mcp_auth_tokens",o=()=>{try{let e=localStorage.getItem(t);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading MCP auth tokens from localStorage:",e),{}}},l=(e,r)=>{try{let n=o()[e];if(n&&n.serverAlias===r||n&&!r&&!n.serverAlias)return n.authValue;return null}catch(e){return console.error("Error getting MCP auth token:",e),null}},i=(e,r,n,l)=>{try{let i=o();i[e]={serverId:e,serverAlias:l,authValue:r,authType:n,timestamp:Date.now()},localStorage.setItem(t,JSON.stringify(i))}catch(e){console.error("Error storing MCP auth token:",e)}},u=e=>{try{let r=o();delete r[e],localStorage.setItem(t,JSON.stringify(r))}catch(e){console.error("Error removing MCP auth token:",e)}},c=()=>{try{localStorage.removeItem(t)}catch(e){console.error("Error clearing MCP auth tokens:",e)}}},12322:function(e,r,n){"use strict";n.d(r,{w:function(){return c}});var t=n(57437),o=n(2265),l=n(71594),i=n(24525),u=n(19130);function c(e){let{data:r=[],columns:n,getRowCanExpand:c,renderSubComponent:s,isLoading:a=!1,loadingMessage:d="\uD83D\uDE85 Loading logs...",noDataMessage:f="No logs found"}=e,m=(0,l.b7)({data:r,columns:n,getRowCanExpand:c,getRowId:(e,r)=>{var n;return null!==(n=null==e?void 0:e.request_id)&&void 0!==n?n:String(r)},getCoreRowModel:(0,i.sC)(),getExpandedRowModel:(0,i.rV)()});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(u.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(u.ss,{children:m.getHeaderGroups().map(e=>(0,t.jsx)(u.SC,{children:e.headers.map(e=>(0,t.jsx)(u.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,l.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,t.jsx)(u.RM,{children:a?(0,t.jsx)(u.SC,{children:(0,t.jsx)(u.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:d})})})}):m.getRowModel().rows.length>0?m.getRowModel().rows.map(e=>(0,t.jsxs)(o.Fragment,{children:[(0,t.jsx)(u.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(u.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,l.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,t.jsx)(u.SC,{children:(0,t.jsx)(u.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:s({row:e})})})})]},e.id)):(0,t.jsx)(u.SC,{children:(0,t.jsx)(u.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})})})]})})}},59872:function(e,r,n){"use strict";n.d(r,{nl:function(){return o},pw:function(){return l},vQ:function(){return i}});var t=n(9114);function o(e,r){let n=structuredClone(e);for(let[e,t]of Object.entries(r))e in n&&(n[e]=t);return n}let l=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||!Number.isFinite(e))return"-";let t={minimumFractionDigits:r,maximumFractionDigits:r};if(!n)return e.toLocaleString("en-US",t);let o=Math.abs(e),l=o,i="";return o>=1e6?(l=o/1e6,i="M"):o>=1e3&&(l=o/1e3,i="K"),"".concat(e<0?"-":"").concat(l.toLocaleString("en-US",t)).concat(i)},i=async function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return u(e,r);try{return await navigator.clipboard.writeText(e),t.Z.success(r),!0}catch(n){return console.error("Clipboard API failed: ",n),u(e,r)}},u=(e,r)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let o=document.execCommand("copy");if(document.body.removeChild(n),o)return t.Z.success(r),!0;throw Error("execCommand failed")}catch(e){return t.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}}},20347:function(e,r,n){"use strict";n.d(r,{LQ:function(){return l},ZL:function(){return t},lo:function(){return o},tY:function(){return i}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],o=["Internal User","Internal Viewer"],l=["Internal User","Admin","proxy_admin"],i=e=>t.includes(e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,352,1264,4851,5030,4642,8049,4138,2971,2117,1744],function(){return e(e.s=61621)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6940],{61621:function(e,r,n){Promise.resolve().then(n.bind(n,45045))},36724:function(e,r,n){"use strict";n.d(r,{Dx:function(){return i.Z},Zb:function(){return o.Z},xv:function(){return l.Z},zx:function(){return t.Z}});var t=n(20831),o=n(12514),l=n(84264),i=n(96761)},64504:function(e,r,n){"use strict";n.d(r,{o:function(){return o.Z},z:function(){return t.Z}});var t=n(20831),o=n(49566)},19130:function(e,r,n){"use strict";n.d(r,{RM:function(){return o.Z},SC:function(){return c.Z},iA:function(){return t.Z},pj:function(){return l.Z},ss:function(){return i.Z},xs:function(){return u.Z}});var t=n(21626),o=n(97214),l=n(28241),i=n(58834),u=n(69552),c=n(71876)},92280:function(e,r,n){"use strict";n.d(r,{x:function(){return t.Z}});var t=n(84264)},80443:function(e,r,n){"use strict";var t=n(2265),o=n(99376),l=n(14474),i=n(3914);r.Z=()=>{var e,r,n,u,c,s,a;let d=(0,o.useRouter)(),f="undefined"!=typeof document?(0,i.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let m=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,l.o)(f)}catch(e){return(0,i.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==m?void 0:m.key)&&void 0!==e?e:null,userId:null!==(r=null==m?void 0:m.user_id)&&void 0!==r?r:null,userEmail:null!==(n=null==m?void 0:m.user_email)&&void 0!==n?n:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(u=null==m?void 0:m.user_role)&&void 0!==u?u:null),premiumUser:null!==(c=null==m?void 0:m.premium_user)&&void 0!==c?c:null,disabledPersonalKeyCreation:null!==(s=null==m?void 0:m.disabled_non_admin_personal_key_creation)&&void 0!==s?s:null,showSSOBanner:(null==m?void 0:m.login_method)==="username_password"}}},45045:function(e,r,n){"use strict";n.r(r);var t=n(57437),o=n(94138),l=n(80443),i=n(21623),u=n(29827);r.default=()=>{let{accessToken:e,userRole:r,userId:n}=(0,l.Z)(),c=new i.S;return(0,t.jsx)(u.aH,{client:c,children:(0,t.jsx)(o.d,{accessToken:e,userRole:r,userID:n})})}},29488:function(e,r,n){"use strict";n.d(r,{Hc:function(){return i},Ui:function(){return l},e4:function(){return u},xd:function(){return c}});let t="litellm_mcp_auth_tokens",o=()=>{try{let e=localStorage.getItem(t);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading MCP auth tokens from localStorage:",e),{}}},l=(e,r)=>{try{let n=o()[e];if(n&&n.serverAlias===r||n&&!r&&!n.serverAlias)return n.authValue;return null}catch(e){return console.error("Error getting MCP auth token:",e),null}},i=(e,r,n,l)=>{try{let i=o();i[e]={serverId:e,serverAlias:l,authValue:r,authType:n,timestamp:Date.now()},localStorage.setItem(t,JSON.stringify(i))}catch(e){console.error("Error storing MCP auth token:",e)}},u=e=>{try{let r=o();delete r[e],localStorage.setItem(t,JSON.stringify(r))}catch(e){console.error("Error removing MCP auth token:",e)}},c=()=>{try{localStorage.removeItem(t)}catch(e){console.error("Error clearing MCP auth tokens:",e)}}},12322:function(e,r,n){"use strict";n.d(r,{w:function(){return c}});var t=n(57437),o=n(2265),l=n(71594),i=n(24525),u=n(19130);function c(e){let{data:r=[],columns:n,getRowCanExpand:c,renderSubComponent:s,isLoading:a=!1,loadingMessage:d="\uD83D\uDE85 Loading logs...",noDataMessage:f="No logs found"}=e,m=(0,l.b7)({data:r,columns:n,getRowCanExpand:c,getRowId:(e,r)=>{var n;return null!==(n=null==e?void 0:e.request_id)&&void 0!==n?n:String(r)},getCoreRowModel:(0,i.sC)(),getExpandedRowModel:(0,i.rV)()});return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,t.jsxs)(u.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,t.jsx)(u.ss,{children:m.getHeaderGroups().map(e=>(0,t.jsx)(u.SC,{children:e.headers.map(e=>(0,t.jsx)(u.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,l.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,t.jsx)(u.RM,{children:a?(0,t.jsx)(u.SC,{children:(0,t.jsx)(u.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:d})})})}):m.getRowModel().rows.length>0?m.getRowModel().rows.map(e=>(0,t.jsxs)(o.Fragment,{children:[(0,t.jsx)(u.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,t.jsx)(u.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,l.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,t.jsx)(u.SC,{children:(0,t.jsx)(u.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:s({row:e})})})})]},e.id)):(0,t.jsx)(u.SC,{children:(0,t.jsx)(u.pj,{colSpan:n.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-gray-500",children:(0,t.jsx)("p",{children:f})})})})})]})})}},59872:function(e,r,n){"use strict";n.d(r,{nl:function(){return o},pw:function(){return l},vQ:function(){return i}});var t=n(9114);function o(e,r){let n=structuredClone(e);for(let[e,t]of Object.entries(r))e in n&&(n[e]=t);return n}let l=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||!Number.isFinite(e))return"-";let t={minimumFractionDigits:r,maximumFractionDigits:r};if(!n)return e.toLocaleString("en-US",t);let o=Math.abs(e),l=o,i="";return o>=1e6?(l=o/1e6,i="M"):o>=1e3&&(l=o/1e3,i="K"),"".concat(e<0?"-":"").concat(l.toLocaleString("en-US",t)).concat(i)},i=async function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return u(e,r);try{return await navigator.clipboard.writeText(e),t.Z.success(r),!0}catch(n){return console.error("Clipboard API failed: ",n),u(e,r)}},u=(e,r)=>{try{let n=document.createElement("textarea");n.value=e,n.style.position="fixed",n.style.left="-999999px",n.style.top="-999999px",n.setAttribute("readonly",""),document.body.appendChild(n),n.focus(),n.select();let o=document.execCommand("copy");if(document.body.removeChild(n),o)return t.Z.success(r),!0;throw Error("execCommand failed")}catch(e){return t.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}}},20347:function(e,r,n){"use strict";n.d(r,{LQ:function(){return l},ZL:function(){return t},lo:function(){return o},tY:function(){return i}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],o=["Internal User","Internal Viewer"],l=["Internal User","Admin","proxy_admin"],i=e=>t.includes(e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,352,1264,4851,5030,4642,8049,4138,2971,2117,1744],function(){return e(e.s=61621)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/vector-stores/page-e87e07b0e702176d.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/vector-stores/page-041c519b4c624669.js similarity index 98% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/vector-stores/page-e87e07b0e702176d.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/vector-stores/page-041c519b4c624669.js index 8c1973da028..2e0571b3efb 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/vector-stores/page-e87e07b0e702176d.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/tools/vector-stores/page-041c519b4c624669.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6248],{64362:function(e,n,r){Promise.resolve().then(r.bind(r,77438))},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return o.Z}});var o=r(20831)},64504:function(e,n,r){"use strict";r.d(n,{o:function(){return a.Z},z:function(){return o.Z}});var o=r(20831),a=r(49566)},39760:function(e,n,r){"use strict";var o=r(2265),a=r(99376),t=r(14474),i=r(3914);n.Z=()=>{var e,n,r,l,c,s,u;let p=(0,a.useRouter)(),d="undefined"!=typeof document?(0,i.e)("token"):null;(0,o.useEffect)(()=>{d||p.replace("/sso/key/generate")},[d,p]);let A=(0,o.useMemo)(()=>{if(!d)return null;try{return(0,t.o)(d)}catch(e){return(0,i.b)(),p.replace("/sso/key/generate"),null}},[d,p]);return{token:d,accessToken:null!==(e=null==A?void 0:A.key)&&void 0!==e?e:null,userId:null!==(n=null==A?void 0:A.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==A?void 0:A.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==A?void 0:A.user_role)&&void 0!==l?l:null),premiumUser:null!==(c=null==A?void 0:A.premium_user)&&void 0!==c?c:null,disabledPersonalKeyCreation:null!==(s=null==A?void 0:A.disabled_non_admin_personal_key_creation)&&void 0!==s?s:null,showSSOBanner:(null==A?void 0:A.login_method)==="username_password"}}},77438:function(e,n,r){"use strict";r.r(n);var o=r(57437),a=r(6204),t=r(39760);n.default=()=>{let{accessToken:e,userId:n,userRole:r}=(0,t.Z)();return(0,o.jsx)(a.Z,{accessToken:e,userID:n,userRole:r})}},42673:function(e,n,r){"use strict";var o,a;r.d(n,{Cl:function(){return o},bK:function(){return u},cd:function(){return l},dr:function(){return c},fK:function(){return t},ph:function(){return s}}),(a=o||(o={})).AIML="AI/ML API",a.Bedrock="Amazon Bedrock",a.Anthropic="Anthropic",a.AssemblyAI="AssemblyAI",a.SageMaker="AWS SageMaker",a.Azure="Azure",a.Azure_AI_Studio="Azure AI Foundry (Studio)",a.Cerebras="Cerebras",a.Cohere="Cohere",a.Dashscope="Dashscope",a.Databricks="Databricks (Qwen API)",a.DeepInfra="DeepInfra",a.Deepgram="Deepgram",a.Deepseek="Deepseek",a.ElevenLabs="ElevenLabs",a.FalAI="Fal AI",a.FireworksAI="Fireworks AI",a.Google_AI_Studio="Google AI Studio",a.GradientAI="GradientAI",a.Groq="Groq",a.Hosted_Vllm="vllm",a.Infinity="Infinity",a.JinaAI="Jina AI",a.MistralAI="Mistral AI",a.Ollama="Ollama",a.OpenAI="OpenAI",a.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",a.OpenAI_Text="OpenAI Text Completion",a.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",a.Openrouter="Openrouter",a.Oracle="Oracle Cloud Infrastructure (OCI)",a.Perplexity="Perplexity",a.Sambanova="Sambanova",a.Snowflake="Snowflake",a.TogetherAI="TogetherAI",a.Triton="Triton",a.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",a.VolcEngine="VolcEngine",a.Voyage="Voyage AI",a.xAI="xAI";let t={AIML:"aiml",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",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity"},i="/ui/assets/logos/",l={"AI/ML API":"".concat(i,"aiml_api.svg"),Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),"Databricks (Qwen API)":"".concat(i,"databricks.svg"),Dashscope:"".concat(i,"dashscope.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),vllm:"".concat(i,"vllm.png"),Infinity:"".concat(i,"infinity.png"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(i,"oracle.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),Snowflake:"".concat(i,"snowflake.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Fal AI":"".concat(i,"fal_ai.jpg"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},c=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:l[e],displayName:e}}let n=Object.keys(t).find(n=>t[n].toLowerCase()===e.toLowerCase());if(!n)return{logo:"",displayName:e};let r=o[n];return{logo:l[r],displayName:r}},s=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"azure/my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else return"gpt-3.5-turbo"},u=(e,n)=>{console.log("Provider key: ".concat(e));let r=t[e];console.log("Provider mapped to: ".concat(r));let o=[];return e&&"object"==typeof n&&(Object.entries(n).forEach(e=>{let[n,a]=e;null!==a&&"object"==typeof a&&"litellm_provider"in a&&(a.litellm_provider===r||a.litellm_provider.includes(r))&&o.push(n)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(n).forEach(e=>{let[n,r]=e;null!==r&&"object"==typeof r&&"litellm_provider"in r&&"cohere_chat"===r.litellm_provider&&o.push(n)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(n).forEach(e=>{let[n,r]=e;null!==r&&"object"==typeof r&&"litellm_provider"in r&&"sagemaker_chat"===r.litellm_provider&&o.push(n)}))),o}},20347:function(e,n,r){"use strict";r.d(n,{LQ:function(){return t},ZL:function(){return o},lo:function(){return a},tY:function(){return i}});let o=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],a=["Internal User","Internal Viewer"],t=["Internal User","Admin","proxy_admin"],i=e=>o.includes(e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,9775,2525,1529,7908,352,1747,8049,6204,2971,2117,1744],function(){return e(e.s=64362)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6248],{64362:function(e,n,r){Promise.resolve().then(r.bind(r,77438))},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return o.Z}});var o=r(20831)},64504:function(e,n,r){"use strict";r.d(n,{o:function(){return a.Z},z:function(){return o.Z}});var o=r(20831),a=r(49566)},80443:function(e,n,r){"use strict";var o=r(2265),a=r(99376),t=r(14474),i=r(3914);n.Z=()=>{var e,n,r,l,c,s,u;let p=(0,a.useRouter)(),d="undefined"!=typeof document?(0,i.e)("token"):null;(0,o.useEffect)(()=>{d||p.replace("/sso/key/generate")},[d,p]);let A=(0,o.useMemo)(()=>{if(!d)return null;try{return(0,t.o)(d)}catch(e){return(0,i.b)(),p.replace("/sso/key/generate"),null}},[d,p]);return{token:d,accessToken:null!==(e=null==A?void 0:A.key)&&void 0!==e?e:null,userId:null!==(n=null==A?void 0:A.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==A?void 0:A.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==A?void 0:A.user_role)&&void 0!==l?l:null),premiumUser:null!==(c=null==A?void 0:A.premium_user)&&void 0!==c?c:null,disabledPersonalKeyCreation:null!==(s=null==A?void 0:A.disabled_non_admin_personal_key_creation)&&void 0!==s?s:null,showSSOBanner:(null==A?void 0:A.login_method)==="username_password"}}},77438:function(e,n,r){"use strict";r.r(n);var o=r(57437),a=r(6204),t=r(80443);n.default=()=>{let{accessToken:e,userId:n,userRole:r}=(0,t.Z)();return(0,o.jsx)(a.Z,{accessToken:e,userID:n,userRole:r})}},42673:function(e,n,r){"use strict";var o,a;r.d(n,{Cl:function(){return o},bK:function(){return u},cd:function(){return l},dr:function(){return c},fK:function(){return t},ph:function(){return s}}),(a=o||(o={})).AIML="AI/ML API",a.Bedrock="Amazon Bedrock",a.Anthropic="Anthropic",a.AssemblyAI="AssemblyAI",a.SageMaker="AWS SageMaker",a.Azure="Azure",a.Azure_AI_Studio="Azure AI Foundry (Studio)",a.Cerebras="Cerebras",a.Cohere="Cohere",a.Dashscope="Dashscope",a.Databricks="Databricks (Qwen API)",a.DeepInfra="DeepInfra",a.Deepgram="Deepgram",a.Deepseek="Deepseek",a.ElevenLabs="ElevenLabs",a.FalAI="Fal AI",a.FireworksAI="Fireworks AI",a.Google_AI_Studio="Google AI Studio",a.GradientAI="GradientAI",a.Groq="Groq",a.Hosted_Vllm="vllm",a.Infinity="Infinity",a.JinaAI="Jina AI",a.MistralAI="Mistral AI",a.Ollama="Ollama",a.OpenAI="OpenAI",a.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",a.OpenAI_Text="OpenAI Text Completion",a.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",a.Openrouter="Openrouter",a.Oracle="Oracle Cloud Infrastructure (OCI)",a.Perplexity="Perplexity",a.Sambanova="Sambanova",a.Snowflake="Snowflake",a.TogetherAI="TogetherAI",a.Triton="Triton",a.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",a.VolcEngine="VolcEngine",a.Voyage="Voyage AI",a.xAI="xAI";let t={AIML:"aiml",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",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity"},i="/ui/assets/logos/",l={"AI/ML API":"".concat(i,"aiml_api.svg"),Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),"Databricks (Qwen API)":"".concat(i,"databricks.svg"),Dashscope:"".concat(i,"dashscope.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),vllm:"".concat(i,"vllm.png"),Infinity:"".concat(i,"infinity.png"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(i,"oracle.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),Snowflake:"".concat(i,"snowflake.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Fal AI":"".concat(i,"fal_ai.jpg"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},c=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:l[e],displayName:e}}let n=Object.keys(t).find(n=>t[n].toLowerCase()===e.toLowerCase());if(!n)return{logo:"",displayName:e};let r=o[n];return{logo:l[r],displayName:r}},s=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"azure/my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else return"gpt-3.5-turbo"},u=(e,n)=>{console.log("Provider key: ".concat(e));let r=t[e];console.log("Provider mapped to: ".concat(r));let o=[];return e&&"object"==typeof n&&(Object.entries(n).forEach(e=>{let[n,a]=e;null!==a&&"object"==typeof a&&"litellm_provider"in a&&(a.litellm_provider===r||a.litellm_provider.includes(r))&&o.push(n)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(n).forEach(e=>{let[n,r]=e;null!==r&&"object"==typeof r&&"litellm_provider"in r&&"cohere_chat"===r.litellm_provider&&o.push(n)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(n).forEach(e=>{let[n,r]=e;null!==r&&"object"==typeof r&&"litellm_provider"in r&&"sagemaker_chat"===r.litellm_provider&&o.push(n)}))),o}},20347:function(e,n,r){"use strict";r.d(n,{LQ:function(){return t},ZL:function(){return o},lo:function(){return a},tY:function(){return i}});let o=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],a=["Internal User","Internal Viewer"],t=["Internal User","Admin","proxy_admin"],i=e=>o.includes(e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,9775,2525,1529,7908,352,1747,8049,6204,2971,2117,1744],function(){return e(e.s=64362)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/usage/page-01539529e21d2588.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/usage/page-4108e5f8a41bca23.js similarity index 98% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/usage/page-01539529e21d2588.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/usage/page-4108e5f8a41bca23.js index 8b607b90713..80493719b17 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/usage/page-01539529e21d2588.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/usage/page-4108e5f8a41bca23.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4746],{58109:function(e,n,t){Promise.resolve().then(t.bind(t,26661))},5540:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(1119),o=t(2265),a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},i=t(55015),l=o.forwardRef(function(e,n){return o.createElement(i.Z,(0,r.Z)({},e,{ref:n,icon:a}))})},16312:function(e,n,t){"use strict";t.d(n,{z:function(){return r.Z}});var r=t(20831)},19130:function(e,n,t){"use strict";t.d(n,{RM:function(){return o.Z},SC:function(){return c.Z},iA:function(){return r.Z},pj:function(){return a.Z},ss:function(){return i.Z},xs:function(){return l.Z}});var r=t(21626),o=t(97214),a=t(28241),i=t(58834),l=t(69552),c=t(71876)},11318:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(2265),o=t(39760),a=t(19250);let i=async(e,n,t,r)=>"Admin"!=t&&"Admin Viewer"!=t?await (0,a.teamListCall)(e,(null==r?void 0:r.organization_id)||null,n):await (0,a.teamListCall)(e,(null==r?void 0:r.organization_id)||null);var l=()=>{let[e,n]=(0,r.useState)([]),{accessToken:t,userId:a,userRole:l}=(0,o.Z)();return(0,r.useEffect)(()=>{(async()=>{n(await i(t,a,l,null))})()},[t,a,l]),{teams:e,setTeams:n}}},26661:function(e,n,t){"use strict";t.r(n);var r=t(57437),o=t(62306),a=t(39760),i=t(11318);n.default=()=>{let{accessToken:e,userRole:n,userId:t,premiumUser:l}=(0,a.Z)(),{teams:c}=(0,i.Z)();return(0,r.jsx)(o.Z,{accessToken:e,userRole:n,userID:t,teams:null!=c?c:[],premiumUser:l})}},42673:function(e,n,t){"use strict";var r,o;t.d(n,{Cl:function(){return r},bK:function(){return u},cd:function(){return l},dr:function(){return c},fK:function(){return a},ph:function(){return s}}),(o=r||(r={})).AIML="AI/ML API",o.Bedrock="Amazon Bedrock",o.Anthropic="Anthropic",o.AssemblyAI="AssemblyAI",o.SageMaker="AWS SageMaker",o.Azure="Azure",o.Azure_AI_Studio="Azure AI Foundry (Studio)",o.Cerebras="Cerebras",o.Cohere="Cohere",o.Dashscope="Dashscope",o.Databricks="Databricks (Qwen API)",o.DeepInfra="DeepInfra",o.Deepgram="Deepgram",o.Deepseek="Deepseek",o.ElevenLabs="ElevenLabs",o.FalAI="Fal AI",o.FireworksAI="Fireworks AI",o.Google_AI_Studio="Google AI Studio",o.GradientAI="GradientAI",o.Groq="Groq",o.Hosted_Vllm="vllm",o.Infinity="Infinity",o.JinaAI="Jina AI",o.MistralAI="Mistral AI",o.Ollama="Ollama",o.OpenAI="OpenAI",o.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",o.OpenAI_Text="OpenAI Text Completion",o.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",o.Openrouter="Openrouter",o.Oracle="Oracle Cloud Infrastructure (OCI)",o.Perplexity="Perplexity",o.Sambanova="Sambanova",o.Snowflake="Snowflake",o.TogetherAI="TogetherAI",o.Triton="Triton",o.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",o.VolcEngine="VolcEngine",o.Voyage="Voyage AI",o.xAI="xAI";let a={AIML:"aiml",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",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity"},i="/ui/assets/logos/",l={"AI/ML API":"".concat(i,"aiml_api.svg"),Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),"Databricks (Qwen API)":"".concat(i,"databricks.svg"),Dashscope:"".concat(i,"dashscope.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),vllm:"".concat(i,"vllm.png"),Infinity:"".concat(i,"infinity.png"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(i,"oracle.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),Snowflake:"".concat(i,"snowflake.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Fal AI":"".concat(i,"fal_ai.jpg"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},c=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:l[e],displayName:e}}let n=Object.keys(a).find(n=>a[n].toLowerCase()===e.toLowerCase());if(!n)return{logo:"",displayName:e};let t=r[n];return{logo:l[t],displayName:t}},s=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"azure/my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else return"gpt-3.5-turbo"},u=(e,n)=>{console.log("Provider key: ".concat(e));let t=a[e];console.log("Provider mapped to: ".concat(t));let r=[];return e&&"object"==typeof n&&(Object.entries(n).forEach(e=>{let[n,o]=e;null!==o&&"object"==typeof o&&"litellm_provider"in o&&(o.litellm_provider===t||o.litellm_provider.includes(t))&&r.push(n)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(n).forEach(e=>{let[n,t]=e;null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&r.push(n)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(n).forEach(e=>{let[n,t]=e;null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&r.push(n)}))),r}},12322:function(e,n,t){"use strict";t.d(n,{w:function(){return c}});var r=t(57437),o=t(2265),a=t(71594),i=t(24525),l=t(19130);function c(e){let{data:n=[],columns:t,getRowCanExpand:c,renderSubComponent:s,isLoading:u=!1,loadingMessage:p="\uD83D\uDE85 Loading logs...",noDataMessage:d="No logs found"}=e,g=(0,a.b7)({data:n,columns:t,getRowCanExpand:c,getRowId:(e,n)=>{var t;return null!==(t=null==e?void 0:e.request_id)&&void 0!==t?t:String(n)},getCoreRowModel:(0,i.sC)(),getExpandedRowModel:(0,i.rV)()});return(0,r.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,r.jsxs)(l.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,r.jsx)(l.ss,{children:g.getHeaderGroups().map(e=>(0,r.jsx)(l.SC,{children:e.headers.map(e=>(0,r.jsx)(l.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,a.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,r.jsx)(l.RM,{children:u?(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:p})})})}):g.getRowModel().rows.length>0?g.getRowModel().rows.map(e=>(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(l.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,r.jsx)(l.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,r.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:s({row:e})})})})]},e.id)):(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:d})})})})})]})})}},10900:function(e,n,t){"use strict";var r=t(2265);let o=r.forwardRef(function(e,n){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:n},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});n.Z=o}},function(e){e.O(0,[6990,1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,5188,2344,7732,4851,1160,3250,8049,131,2202,874,4292,2306,2971,2117,1744],function(){return e(e.s=58109)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4746],{58109:function(e,n,t){Promise.resolve().then(t.bind(t,26661))},5540:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(1119),o=t(2265),a={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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},i=t(55015),l=o.forwardRef(function(e,n){return o.createElement(i.Z,(0,r.Z)({},e,{ref:n,icon:a}))})},16312:function(e,n,t){"use strict";t.d(n,{z:function(){return r.Z}});var r=t(20831)},19130:function(e,n,t){"use strict";t.d(n,{RM:function(){return o.Z},SC:function(){return c.Z},iA:function(){return r.Z},pj:function(){return a.Z},ss:function(){return i.Z},xs:function(){return l.Z}});var r=t(21626),o=t(97214),a=t(28241),i=t(58834),l=t(69552),c=t(71876)},11318:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var r=t(2265),o=t(80443),a=t(19250);let i=async(e,n,t,r)=>"Admin"!=t&&"Admin Viewer"!=t?await (0,a.teamListCall)(e,(null==r?void 0:r.organization_id)||null,n):await (0,a.teamListCall)(e,(null==r?void 0:r.organization_id)||null);var l=()=>{let[e,n]=(0,r.useState)([]),{accessToken:t,userId:a,userRole:l}=(0,o.Z)();return(0,r.useEffect)(()=>{(async()=>{n(await i(t,a,l,null))})()},[t,a,l]),{teams:e,setTeams:n}}},26661:function(e,n,t){"use strict";t.r(n);var r=t(57437),o=t(62306),a=t(80443),i=t(11318);n.default=()=>{let{accessToken:e,userRole:n,userId:t,premiumUser:l}=(0,a.Z)(),{teams:c}=(0,i.Z)();return(0,r.jsx)(o.Z,{accessToken:e,userRole:n,userID:t,teams:null!=c?c:[],premiumUser:l})}},42673:function(e,n,t){"use strict";var r,o;t.d(n,{Cl:function(){return r},bK:function(){return u},cd:function(){return l},dr:function(){return c},fK:function(){return a},ph:function(){return s}}),(o=r||(r={})).AIML="AI/ML API",o.Bedrock="Amazon Bedrock",o.Anthropic="Anthropic",o.AssemblyAI="AssemblyAI",o.SageMaker="AWS SageMaker",o.Azure="Azure",o.Azure_AI_Studio="Azure AI Foundry (Studio)",o.Cerebras="Cerebras",o.Cohere="Cohere",o.Dashscope="Dashscope",o.Databricks="Databricks (Qwen API)",o.DeepInfra="DeepInfra",o.Deepgram="Deepgram",o.Deepseek="Deepseek",o.ElevenLabs="ElevenLabs",o.FalAI="Fal AI",o.FireworksAI="Fireworks AI",o.Google_AI_Studio="Google AI Studio",o.GradientAI="GradientAI",o.Groq="Groq",o.Hosted_Vllm="vllm",o.Infinity="Infinity",o.JinaAI="Jina AI",o.MistralAI="Mistral AI",o.Ollama="Ollama",o.OpenAI="OpenAI",o.OpenAI_Compatible="OpenAI-Compatible Endpoints (Together AI, etc.)",o.OpenAI_Text="OpenAI Text Completion",o.OpenAI_Text_Compatible="OpenAI-Compatible Text Completion Models (Together AI, etc.)",o.Openrouter="Openrouter",o.Oracle="Oracle Cloud Infrastructure (OCI)",o.Perplexity="Perplexity",o.Sambanova="Sambanova",o.Snowflake="Snowflake",o.TogetherAI="TogetherAI",o.Triton="Triton",o.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",o.VolcEngine="VolcEngine",o.Voyage="Voyage AI",o.xAI="xAI";let a={AIML:"aiml",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",OpenAI_Compatible:"openai",OpenAI_Text_Compatible:"text-completion-openai",Vertex_AI:"vertex_ai",Databricks:"databricks",Dashscope:"dashscope",xAI:"xai",Deepseek:"deepseek",Ollama:"ollama",AssemblyAI:"assemblyai",Cerebras:"cerebras",Sambanova:"sambanova",Perplexity:"perplexity",TogetherAI:"together_ai",Openrouter:"openrouter",Oracle:"oci",Snowflake:"snowflake",FireworksAI:"fireworks_ai",GradientAI:"gradient_ai",Triton:"triton",Deepgram:"deepgram",ElevenLabs:"elevenlabs",FalAI:"fal_ai",SageMaker:"sagemaker_chat",Voyage:"voyage",JinaAI:"jina_ai",VolcEngine:"volcengine",DeepInfra:"deepinfra",Hosted_Vllm:"hosted_vllm",Infinity:"infinity"},i="/ui/assets/logos/",l={"AI/ML API":"".concat(i,"aiml_api.svg"),Anthropic:"".concat(i,"anthropic.svg"),AssemblyAI:"".concat(i,"assemblyai_small.png"),Azure:"".concat(i,"microsoft_azure.svg"),"Azure AI Foundry (Studio)":"".concat(i,"microsoft_azure.svg"),"Amazon Bedrock":"".concat(i,"bedrock.svg"),"AWS SageMaker":"".concat(i,"bedrock.svg"),Cerebras:"".concat(i,"cerebras.svg"),Cohere:"".concat(i,"cohere.svg"),"Databricks (Qwen API)":"".concat(i,"databricks.svg"),Dashscope:"".concat(i,"dashscope.svg"),Deepseek:"".concat(i,"deepseek.svg"),"Fireworks AI":"".concat(i,"fireworks.svg"),Groq:"".concat(i,"groq.svg"),"Google AI Studio":"".concat(i,"google.svg"),vllm:"".concat(i,"vllm.png"),Infinity:"".concat(i,"infinity.png"),"Mistral AI":"".concat(i,"mistral.svg"),Ollama:"".concat(i,"ollama.svg"),OpenAI:"".concat(i,"openai_small.svg"),"OpenAI Text Completion":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Text Completion Models (Together AI, etc.)":"".concat(i,"openai_small.svg"),"OpenAI-Compatible Endpoints (Together AI, etc.)":"".concat(i,"openai_small.svg"),Openrouter:"".concat(i,"openrouter.svg"),"Oracle Cloud Infrastructure (OCI)":"".concat(i,"oracle.svg"),Perplexity:"".concat(i,"perplexity-ai.svg"),Sambanova:"".concat(i,"sambanova.svg"),Snowflake:"".concat(i,"snowflake.svg"),TogetherAI:"".concat(i,"togetherai.svg"),"Vertex AI (Anthropic, Gemini, etc.)":"".concat(i,"google.svg"),xAI:"".concat(i,"xai.svg"),GradientAI:"".concat(i,"gradientai.svg"),Triton:"".concat(i,"nvidia_triton.png"),Deepgram:"".concat(i,"deepgram.png"),ElevenLabs:"".concat(i,"elevenlabs.png"),"Fal AI":"".concat(i,"fal_ai.jpg"),"Voyage AI":"".concat(i,"voyage.webp"),"Jina AI":"".concat(i,"jina.png"),VolcEngine:"".concat(i,"volcengine.png"),DeepInfra:"".concat(i,"deepinfra.png")},c=e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:l[e],displayName:e}}let n=Object.keys(a).find(n=>a[n].toLowerCase()===e.toLowerCase());if(!n)return{logo:"",displayName:e};let t=r[n];return{logo:l[t],displayName:t}},s=e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e||"Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";if("Google AI Studio"==e)return"gemini-pro";if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"azure/my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else return"gpt-3.5-turbo"},u=(e,n)=>{console.log("Provider key: ".concat(e));let t=a[e];console.log("Provider mapped to: ".concat(t));let r=[];return e&&"object"==typeof n&&(Object.entries(n).forEach(e=>{let[n,o]=e;null!==o&&"object"==typeof o&&"litellm_provider"in o&&(o.litellm_provider===t||o.litellm_provider.includes(t))&&r.push(n)}),"Cohere"==e&&(console.log("Adding cohere chat models"),Object.entries(n).forEach(e=>{let[n,t]=e;null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&r.push(n)})),"AWS SageMaker"==e&&(console.log("Adding sagemaker chat models"),Object.entries(n).forEach(e=>{let[n,t]=e;null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&r.push(n)}))),r}},12322:function(e,n,t){"use strict";t.d(n,{w:function(){return c}});var r=t(57437),o=t(2265),a=t(71594),i=t(24525),l=t(19130);function c(e){let{data:n=[],columns:t,getRowCanExpand:c,renderSubComponent:s,isLoading:u=!1,loadingMessage:p="\uD83D\uDE85 Loading logs...",noDataMessage:d="No logs found"}=e,g=(0,a.b7)({data:n,columns:t,getRowCanExpand:c,getRowId:(e,n)=>{var t;return null!==(t=null==e?void 0:e.request_id)&&void 0!==t?t:String(n)},getCoreRowModel:(0,i.sC)(),getExpandedRowModel:(0,i.rV)()});return(0,r.jsx)("div",{className:"rounded-lg custom-border overflow-x-auto w-full max-w-full box-border",children:(0,r.jsxs)(l.iA,{className:"[&_td]:py-0.5 [&_th]:py-1 table-fixed w-full box-border",style:{minWidth:"400px"},children:[(0,r.jsx)(l.ss,{children:g.getHeaderGroups().map(e=>(0,r.jsx)(l.SC,{children:e.headers.map(e=>(0,r.jsx)(l.xs,{className:"py-1 h-8",children:e.isPlaceholder?null:(0,a.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,r.jsx)(l.RM,{children:u?(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:p})})})}):g.getRowModel().rows.length>0?g.getRowModel().rows.map(e=>(0,r.jsxs)(o.Fragment,{children:[(0,r.jsx)(l.SC,{className:"h-8",children:e.getVisibleCells().map(e=>(0,r.jsx)(l.pj,{className:"py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap",children:(0,a.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),e.getIsExpanded()&&(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,r.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:s({row:e})})})})]},e.id)):(0,r.jsx)(l.SC,{children:(0,r.jsx)(l.pj,{colSpan:t.length,className:"h-8 text-center",children:(0,r.jsx)("div",{className:"text-center text-gray-500",children:(0,r.jsx)("p",{children:d})})})})})]})})}},10900:function(e,n,t){"use strict";var r=t(2265);let o=r.forwardRef(function(e,n){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:n},e),r.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"}))});n.Z=o}},function(e){e.O(0,[6990,1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,5188,2344,7732,4851,1160,3250,8049,131,2202,874,4292,2306,2971,2117,1744],function(){return e(e.s=58109)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/users/page-7a780389649afa5e.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/users/page-bcba24bd5748f0af.js similarity index 96% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/users/page-7a780389649afa5e.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/users/page-bcba24bd5748f0af.js index fdc74b5caa1..1213d14d21d 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/users/page-7a780389649afa5e.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/users/page-bcba24bd5748f0af.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7297],{32963:function(e,n,r){Promise.resolve().then(r.bind(r,87654))},84717:function(e,n,r){"use strict";r.d(n,{Ct:function(){return t.Z},Dx:function(){return m.Z},OK:function(){return l.Z},Zb:function(){return i.Z},nP:function(){return d.Z},rj:function(){return o.Z},td:function(){return c.Z},v0:function(){return a.Z},x4:function(){return s.Z},xv:function(){return f.Z},zx:function(){return u.Z}});var t=r(41649),u=r(20831),i=r(12514),o=r(67101),l=r(12485),a=r(18135),c=r(35242),s=r(29706),d=r(77991),f=r(84264),m=r(96761)},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return t.Z}});var t=r(20831)},58643:function(e,n,r){"use strict";r.d(n,{OK:function(){return t.Z},nP:function(){return l.Z},td:function(){return i.Z},v0:function(){return u.Z},x4:function(){return o.Z}});var t=r(12485),u=r(18135),i=r(35242),o=r(29706),l=r(77991)},39760:function(e,n,r){"use strict";var t=r(2265),u=r(99376),i=r(14474),o=r(3914);n.Z=()=>{var e,n,r,l,a,c,s;let d=(0,u.useRouter)(),f="undefined"!=typeof document?(0,o.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let m=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,i.o)(f)}catch(e){return(0,o.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==m?void 0:m.key)&&void 0!==e?e:null,userId:null!==(n=null==m?void 0:m.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==m?void 0:m.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==m?void 0:m.user_role)&&void 0!==l?l:null),premiumUser:null!==(a=null==m?void 0:m.premium_user)&&void 0!==a?a:null,disabledPersonalKeyCreation:null!==(c=null==m?void 0:m.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==m?void 0:m.login_method)==="username_password"}}},11318:function(e,n,r){"use strict";r.d(n,{Z:function(){return l}});var t=r(2265),u=r(39760),i=r(19250);let o=async(e,n,r,t)=>"Admin"!=r&&"Admin Viewer"!=r?await (0,i.teamListCall)(e,(null==t?void 0:t.organization_id)||null,n):await (0,i.teamListCall)(e,(null==t?void 0:t.organization_id)||null);var l=()=>{let[e,n]=(0,t.useState)([]),{accessToken:r,userId:i,userRole:l}=(0,u.Z)();return(0,t.useEffect)(()=>{(async()=>{n(await o(r,i,l,null))})()},[r,i,l]),{teams:e,setTeams:n}}},87654:function(e,n,r){"use strict";r.r(n);var t=r(57437),u=r(77155),i=r(39760),o=r(11318),l=r(2265),a=r(21623),c=r(29827);n.default=()=>{let{accessToken:e,userRole:n,userId:r,token:s}=(0,i.Z)(),[d,f]=(0,l.useState)([]),{teams:m}=(0,o.Z)(),p=new a.S;return(0,t.jsx)(c.aH,{client:p,children:(0,t.jsx)(u.Z,{accessToken:e,token:s,keys:d,userRole:n,userID:r,teams:m,setKeys:f})})}},46468:function(e,n,r){"use strict";r.d(n,{K2:function(){return u},Ob:function(){return o},W0:function(){return i}});var t=r(19250);let u=async(e,n,r)=>{try{if(null===e||null===n)return;if(null!==r){let u=(await (0,t.modelAvailableCall)(r,e,n,!0,null,!0)).data.map(e=>e.id),i=[],o=[];return u.forEach(e=>{e.endsWith("/*")?i.push(e):o.push(e)}),[...i,...o]}}catch(e){console.error("Error fetching user models:",e)}},i=e=>{if(e.endsWith("/*")){let n=e.replace("/*","");return"All ".concat(n," models")}return e},o=(e,n)=>{let r=[],t=[];return console.log("teamModels",e),console.log("allModels",n),e.forEach(e=>{if(e.endsWith("/*")){let u=e.replace("/*",""),i=n.filter(e=>e.startsWith(u+"/"));t.push(...i),r.push(e)}else t.push(e)}),[...r,...t].filter((e,n,r)=>r.indexOf(e)===n)}},24199:function(e,n,r){"use strict";r.d(n,{Z:function(){return i}});var t=r(57437);r(2265);var u=r(30150),i=e=>{let{step:n=.01,style:r={width:"100%"},placeholder:i="Enter a numerical value",min:o,max:l,onChange:a,...c}=e;return(0,t.jsx)(u.Z,{onWheel:e=>e.currentTarget.blur(),step:n,style:r,placeholder:i,min:o,max:l,onChange:a,...c})}},59872:function(e,n,r){"use strict";r.d(n,{nl:function(){return u},pw:function(){return i},vQ:function(){return o}});var t=r(9114);function u(e,n){let r=structuredClone(e);for(let[e,t]of Object.entries(n))e in r&&(r[e]=t);return r}let i=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||!Number.isFinite(e))return"-";let t={minimumFractionDigits:n,maximumFractionDigits:n};if(!r)return e.toLocaleString("en-US",t);let u=Math.abs(e),i=u,o="";return u>=1e6?(i=u/1e6,o="M"):u>=1e3&&(i=u/1e3,o="K"),"".concat(e<0?"-":"").concat(i.toLocaleString("en-US",t)).concat(o)},o=async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return l(e,n);try{return await navigator.clipboard.writeText(e),t.Z.success(n),!0}catch(r){return console.error("Clipboard API failed: ",r),l(e,n)}},l=(e,n)=>{try{let r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",r.setAttribute("readonly",""),document.body.appendChild(r),r.focus(),r.select();let u=document.execCommand("copy");if(document.body.removeChild(r),u)return t.Z.success(n),!0;throw Error("execCommand failed")}catch(e){return t.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}}},20347:function(e,n,r){"use strict";r.d(n,{LQ:function(){return i},ZL:function(){return t},lo:function(){return u},tY:function(){return o}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],u=["Internal User","Internal Viewer"],i=["Internal User","Admin","proxy_admin"],o=e=>t.includes(e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8591,7281,5188,352,1264,9358,8049,2202,7155,2971,2117,1744],function(){return e(e.s=32963)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7297],{32963:function(e,n,r){Promise.resolve().then(r.bind(r,87654))},84717:function(e,n,r){"use strict";r.d(n,{Ct:function(){return t.Z},Dx:function(){return m.Z},OK:function(){return l.Z},Zb:function(){return i.Z},nP:function(){return d.Z},rj:function(){return o.Z},td:function(){return c.Z},v0:function(){return a.Z},x4:function(){return s.Z},xv:function(){return f.Z},zx:function(){return u.Z}});var t=r(41649),u=r(20831),i=r(12514),o=r(67101),l=r(12485),a=r(18135),c=r(35242),s=r(29706),d=r(77991),f=r(84264),m=r(96761)},16312:function(e,n,r){"use strict";r.d(n,{z:function(){return t.Z}});var t=r(20831)},58643:function(e,n,r){"use strict";r.d(n,{OK:function(){return t.Z},nP:function(){return l.Z},td:function(){return i.Z},v0:function(){return u.Z},x4:function(){return o.Z}});var t=r(12485),u=r(18135),i=r(35242),o=r(29706),l=r(77991)},80443:function(e,n,r){"use strict";var t=r(2265),u=r(99376),i=r(14474),o=r(3914);n.Z=()=>{var e,n,r,l,a,c,s;let d=(0,u.useRouter)(),f="undefined"!=typeof document?(0,o.e)("token"):null;(0,t.useEffect)(()=>{f||d.replace("/sso/key/generate")},[f,d]);let m=(0,t.useMemo)(()=>{if(!f)return null;try{return(0,i.o)(f)}catch(e){return(0,o.b)(),d.replace("/sso/key/generate"),null}},[f,d]);return{token:f,accessToken:null!==(e=null==m?void 0:m.key)&&void 0!==e?e:null,userId:null!==(n=null==m?void 0:m.user_id)&&void 0!==n?n:null,userEmail:null!==(r=null==m?void 0:m.user_email)&&void 0!==r?r:null,userRole:function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(null!==(l=null==m?void 0:m.user_role)&&void 0!==l?l:null),premiumUser:null!==(a=null==m?void 0:m.premium_user)&&void 0!==a?a:null,disabledPersonalKeyCreation:null!==(c=null==m?void 0:m.disabled_non_admin_personal_key_creation)&&void 0!==c?c:null,showSSOBanner:(null==m?void 0:m.login_method)==="username_password"}}},11318:function(e,n,r){"use strict";r.d(n,{Z:function(){return l}});var t=r(2265),u=r(80443),i=r(19250);let o=async(e,n,r,t)=>"Admin"!=r&&"Admin Viewer"!=r?await (0,i.teamListCall)(e,(null==t?void 0:t.organization_id)||null,n):await (0,i.teamListCall)(e,(null==t?void 0:t.organization_id)||null);var l=()=>{let[e,n]=(0,t.useState)([]),{accessToken:r,userId:i,userRole:l}=(0,u.Z)();return(0,t.useEffect)(()=>{(async()=>{n(await o(r,i,l,null))})()},[r,i,l]),{teams:e,setTeams:n}}},87654:function(e,n,r){"use strict";r.r(n);var t=r(57437),u=r(77155),i=r(80443),o=r(11318),l=r(2265),a=r(21623),c=r(29827);n.default=()=>{let{accessToken:e,userRole:n,userId:r,token:s}=(0,i.Z)(),[d,f]=(0,l.useState)([]),{teams:m}=(0,o.Z)(),p=new a.S;return(0,t.jsx)(c.aH,{client:p,children:(0,t.jsx)(u.Z,{accessToken:e,token:s,keys:d,userRole:n,userID:r,teams:m,setKeys:f})})}},46468:function(e,n,r){"use strict";r.d(n,{K2:function(){return u},Ob:function(){return o},W0:function(){return i}});var t=r(19250);let u=async(e,n,r)=>{try{if(null===e||null===n)return;if(null!==r){let u=(await (0,t.modelAvailableCall)(r,e,n,!0,null,!0)).data.map(e=>e.id),i=[],o=[];return u.forEach(e=>{e.endsWith("/*")?i.push(e):o.push(e)}),[...i,...o]}}catch(e){console.error("Error fetching user models:",e)}},i=e=>{if(e.endsWith("/*")){let n=e.replace("/*","");return"All ".concat(n," models")}return e},o=(e,n)=>{let r=[],t=[];return console.log("teamModels",e),console.log("allModels",n),e.forEach(e=>{if(e.endsWith("/*")){let u=e.replace("/*",""),i=n.filter(e=>e.startsWith(u+"/"));t.push(...i),r.push(e)}else t.push(e)}),[...r,...t].filter((e,n,r)=>r.indexOf(e)===n)}},24199:function(e,n,r){"use strict";r.d(n,{Z:function(){return i}});var t=r(57437);r(2265);var u=r(30150),i=e=>{let{step:n=.01,style:r={width:"100%"},placeholder:i="Enter a numerical value",min:o,max:l,onChange:a,...c}=e;return(0,t.jsx)(u.Z,{onWheel:e=>e.currentTarget.blur(),step:n,style:r,placeholder:i,min:o,max:l,onChange:a,...c})}},59872:function(e,n,r){"use strict";r.d(n,{nl:function(){return u},pw:function(){return i},vQ:function(){return o}});var t=r(9114);function u(e,n){let r=structuredClone(e);for(let[e,t]of Object.entries(n))e in r&&(r[e]=t);return r}let i=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null==e||!Number.isFinite(e))return"-";let t={minimumFractionDigits:n,maximumFractionDigits:n};if(!r)return e.toLocaleString("en-US",t);let u=Math.abs(e),i=u,o="";return u>=1e6?(i=u/1e6,o="M"):u>=1e3&&(i=u/1e3,o="K"),"".concat(e<0?"-":"").concat(i.toLocaleString("en-US",t)).concat(o)},o=async function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Copied to clipboard";if(!e)return!1;if(!navigator||!navigator.clipboard||!navigator.clipboard.writeText)return l(e,n);try{return await navigator.clipboard.writeText(e),t.Z.success(n),!0}catch(r){return console.error("Clipboard API failed: ",r),l(e,n)}},l=(e,n)=>{try{let r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",r.setAttribute("readonly",""),document.body.appendChild(r),r.focus(),r.select();let u=document.execCommand("copy");if(document.body.removeChild(r),u)return t.Z.success(n),!0;throw Error("execCommand failed")}catch(e){return t.Z.fromBackend("Failed to copy to clipboard"),console.error("Failed to copy: ",e),!1}}},20347:function(e,n,r){"use strict";r.d(n,{LQ:function(){return i},ZL:function(){return t},lo:function(){return u},tY:function(){return o}});let t=["Admin","Admin Viewer","proxy_admin","proxy_admin_viewer","org_admin"],u=["Internal User","Internal Viewer"],i=["Internal User","Admin","proxy_admin"],o=e=>t.includes(e)}},function(e){e.O(0,[1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8591,7281,5188,352,1264,9358,8049,2202,7155,2971,2117,1744],function(){return e(e.s=32963)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/virtual-keys/page-61334fac893de776.js b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/virtual-keys/page-acc69883d650bb88.js similarity index 97% rename from ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/virtual-keys/page-61334fac893de776.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/virtual-keys/page-acc69883d650bb88.js index 64686bfc2b3..85b4f4cdc3b 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/virtual-keys/page-61334fac893de776.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/(dashboard)/virtual-keys/page-acc69883d650bb88.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7049],{4222:function(e,a,n){Promise.resolve().then(n.bind(n,2425))},16312:function(e,a,n){"use strict";n.d(a,{z:function(){return t.Z}});var t=n(20831)},10178:function(e,a,n){"use strict";n.d(a,{JO:function(){return t.Z},RM:function(){return l.Z},SC:function(){return o.Z},iA:function(){return r.Z},pj:function(){return s.Z},ss:function(){return i.Z},xs:function(){return c.Z}});var t=n(47323),r=n(21626),l=n(97214),s=n(28241),i=n(58834),c=n(69552),o=n(71876)},11318:function(e,a,n){"use strict";n.d(a,{Z:function(){return i}});var t=n(2265),r=n(39760),l=n(19250);let s=async(e,a,n,t)=>"Admin"!=n&&"Admin Viewer"!=n?await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null,a):await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null);var i=()=>{let[e,a]=(0,t.useState)([]),{accessToken:n,userId:l,userRole:i}=(0,r.Z)();return(0,t.useEffect)(()=>{(async()=>{a(await s(n,l,i,null))})()},[n,l,i]),{teams:e,setTeams:a}}},2425:function(e,a,n){"use strict";n.r(a);var t=n(57437),r=n(2265),l=n(49924),s=n(21623),i=n(29827),c=n(39760),o=n(21739),u=n(11318);a.default=()=>{let{accessToken:e,userRole:a,userId:n,premiumUser:f,userEmail:m}=(0,c.Z)(),{teams:d,setTeams:h}=(0,u.Z)(),[g,p]=(0,r.useState)(!1),[w,y]=(0,r.useState)([]),v=new s.S,{keys:S,isLoading:x,error:C,pagination:b,refresh:E,setKeys:Z}=(0,l.Z)({selectedKeyAlias:null,currentOrg:null,accessToken:e||"",createClicked:g});return(0,t.jsx)(i.aH,{client:v,children:(0,t.jsx)(o.Z,{userID:n,userRole:a,userEmail:m,teams:d,keys:S,setUserRole:()=>{},setUserEmail:()=>{},setTeams:h,setKeys:Z,premiumUser:f,organizations:w,addKey:e=>{Z(a=>a?[...a,e]:[e]),p(()=>!g)},createClicked:g})})}},12363:function(e,a,n){"use strict";n.d(a,{d:function(){return l},n:function(){return r}});var t=n(2265);let r=()=>{let[e,a]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:n}=window.location;a("".concat(e,"//").concat(n))}},[]),e},l=25},30841:function(e,a,n){"use strict";n.d(a,{IE:function(){return l},LO:function(){return r},cT:function(){return s}});var t=n(19250);let r=async e=>{if(!e)return[];try{let{aliases:a}=await (0,t.keyAliasesCall)(e);return Array.from(new Set((a||[]).filter(Boolean)))}catch(e){return console.error("Error fetching all key aliases:",e),[]}},l=async(e,a)=>{if(!e)return[];try{let n=[],r=1,l=!0;for(;l;){let s=await (0,t.teamListCall)(e,a||null,null);n=[...n,...s],r{if(!e)return[];try{let a=[],n=1,r=!0;for(;r;){let l=await (0,t.organizationListCall)(e);a=[...a,...l],n{let{options:a,onApplyFilters:n,onResetFilters:o,initialValues:f={},buttonLabel:m="Filters"}=e,[d,h]=(0,r.useState)(!1),[g,p]=(0,r.useState)(f),[w,y]=(0,r.useState)({}),[v,S]=(0,r.useState)({}),[x,C]=(0,r.useState)({}),[b,E]=(0,r.useState)({}),Z=(0,r.useCallback)(u()(async(e,a)=>{if(a.isSearchable&&a.searchFn){S(e=>({...e,[a.name]:!0}));try{let n=await a.searchFn(e);y(e=>({...e,[a.name]:n}))}catch(e){console.error("Error searching:",e),y(e=>({...e,[a.name]:[]}))}finally{S(e=>({...e,[a.name]:!1}))}}},300),[]),j=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!b[e.name]){S(a=>({...a,[e.name]:!0})),E(a=>({...a,[e.name]:!0}));try{let a=await e.searchFn("");y(n=>({...n,[e.name]:a}))}catch(a){console.error("Error loading initial options:",a),y(a=>({...a,[e.name]:[]}))}finally{S(a=>({...a,[e.name]:!1}))}}},[b]);(0,r.useEffect)(()=>{d&&a.forEach(e=>{e.isSearchable&&!b[e.name]&&j(e)})},[d,a,j,b]);let N=(e,a)=>{let t={...g,[e]:a};p(t),n(t)},k=(e,a)=>{e&&a.isSearchable&&!b[a.name]&&j(a)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.ZP,{icon:(0,t.jsx)(c.Z,{className:"h-4 w-4"}),onClick:()=>h(!d),className:"flex items-center gap-2",children:m}),(0,t.jsx)(l.ZP,{onClick:()=>{let e={};a.forEach(a=>{e[a.name]=""}),p(e),o()},children:"Reset Filters"})]}),d&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Key Hash","Model"].map(e=>{let n=a.find(a=>a.label===e||a.name===e);return n?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:n.label||n.name}),n.isSearchable?(0,t.jsx)(s.default,{showSearch:!0,className:"w-full",placeholder:"Search ".concat(n.label||n.name,"..."),value:g[n.name]||void 0,onChange:e=>N(n.name,e),onDropdownVisibleChange:e=>k(e,n),onSearch:e=>{C(a=>({...a,[n.name]:e})),n.searchFn&&Z(e,n)},filterOption:!1,loading:v[n.name],options:w[n.name]||[],allowClear:!0,notFoundContent:v[n.name]?"Loading...":"No results found"}):n.options?(0,t.jsx)(s.default,{className:"w-full",placeholder:"Select ".concat(n.label||n.name,"..."),value:g[n.name]||void 0,onChange:e=>N(n.name,e),allowClear:!0,children:n.options.map(e=>(0,t.jsx)(s.default.Option,{value:e.value,children:e.label},e.value))}):(0,t.jsx)(i.default,{className:"w-full",placeholder:"Enter ".concat(n.label||n.name,"..."),value:g[n.name]||"",onChange:e=>N(n.name,e.target.value),allowClear:!0})]},n.name):null})})]})}}},function(e){e.O(0,[3665,1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,5188,1264,1791,8049,131,2202,874,4292,1739,2971,2117,1744],function(){return e(e.s=4222)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7049],{4222:function(e,a,n){Promise.resolve().then(n.bind(n,2425))},16312:function(e,a,n){"use strict";n.d(a,{z:function(){return t.Z}});var t=n(20831)},10178:function(e,a,n){"use strict";n.d(a,{JO:function(){return t.Z},RM:function(){return l.Z},SC:function(){return o.Z},iA:function(){return r.Z},pj:function(){return s.Z},ss:function(){return i.Z},xs:function(){return c.Z}});var t=n(47323),r=n(21626),l=n(97214),s=n(28241),i=n(58834),c=n(69552),o=n(71876)},11318:function(e,a,n){"use strict";n.d(a,{Z:function(){return i}});var t=n(2265),r=n(80443),l=n(19250);let s=async(e,a,n,t)=>"Admin"!=n&&"Admin Viewer"!=n?await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null,a):await (0,l.teamListCall)(e,(null==t?void 0:t.organization_id)||null);var i=()=>{let[e,a]=(0,t.useState)([]),{accessToken:n,userId:l,userRole:i}=(0,r.Z)();return(0,t.useEffect)(()=>{(async()=>{a(await s(n,l,i,null))})()},[n,l,i]),{teams:e,setTeams:a}}},2425:function(e,a,n){"use strict";n.r(a);var t=n(57437),r=n(2265),l=n(49924),s=n(21623),i=n(29827),c=n(80443),o=n(21739),u=n(11318);a.default=()=>{let{accessToken:e,userRole:a,userId:n,premiumUser:f,userEmail:m}=(0,c.Z)(),{teams:d,setTeams:h}=(0,u.Z)(),[g,p]=(0,r.useState)(!1),[w,y]=(0,r.useState)([]),v=new s.S,{keys:S,isLoading:x,error:C,pagination:b,refresh:E,setKeys:Z}=(0,l.Z)({selectedKeyAlias:null,currentOrg:null,accessToken:e||"",createClicked:g});return(0,t.jsx)(i.aH,{client:v,children:(0,t.jsx)(o.Z,{userID:n,userRole:a,userEmail:m,teams:d,keys:S,setUserRole:()=>{},setUserEmail:()=>{},setTeams:h,setKeys:Z,premiumUser:f,organizations:w,addKey:e=>{Z(a=>a?[...a,e]:[e]),p(()=>!g)},createClicked:g})})}},12363:function(e,a,n){"use strict";n.d(a,{d:function(){return l},n:function(){return r}});var t=n(2265);let r=()=>{let[e,a]=(0,t.useState)("http://localhost:4000");return(0,t.useEffect)(()=>{{let{protocol:e,host:n}=window.location;a("".concat(e,"//").concat(n))}},[]),e},l=25},30841:function(e,a,n){"use strict";n.d(a,{IE:function(){return l},LO:function(){return r},cT:function(){return s}});var t=n(19250);let r=async e=>{if(!e)return[];try{let{aliases:a}=await (0,t.keyAliasesCall)(e);return Array.from(new Set((a||[]).filter(Boolean)))}catch(e){return console.error("Error fetching all key aliases:",e),[]}},l=async(e,a)=>{if(!e)return[];try{let n=[],r=1,l=!0;for(;l;){let s=await (0,t.teamListCall)(e,a||null,null);n=[...n,...s],r{if(!e)return[];try{let a=[],n=1,r=!0;for(;r;){let l=await (0,t.organizationListCall)(e);a=[...a,...l],n{let{options:a,onApplyFilters:n,onResetFilters:o,initialValues:f={},buttonLabel:m="Filters"}=e,[d,h]=(0,r.useState)(!1),[g,p]=(0,r.useState)(f),[w,y]=(0,r.useState)({}),[v,S]=(0,r.useState)({}),[x,C]=(0,r.useState)({}),[b,E]=(0,r.useState)({}),Z=(0,r.useCallback)(u()(async(e,a)=>{if(a.isSearchable&&a.searchFn){S(e=>({...e,[a.name]:!0}));try{let n=await a.searchFn(e);y(e=>({...e,[a.name]:n}))}catch(e){console.error("Error searching:",e),y(e=>({...e,[a.name]:[]}))}finally{S(e=>({...e,[a.name]:!1}))}}},300),[]),j=(0,r.useCallback)(async e=>{if(e.isSearchable&&e.searchFn&&!b[e.name]){S(a=>({...a,[e.name]:!0})),E(a=>({...a,[e.name]:!0}));try{let a=await e.searchFn("");y(n=>({...n,[e.name]:a}))}catch(a){console.error("Error loading initial options:",a),y(a=>({...a,[e.name]:[]}))}finally{S(a=>({...a,[e.name]:!1}))}}},[b]);(0,r.useEffect)(()=>{d&&a.forEach(e=>{e.isSearchable&&!b[e.name]&&j(e)})},[d,a,j,b]);let N=(e,a)=>{let t={...g,[e]:a};p(t),n(t)},k=(e,a)=>{e&&a.isSearchable&&!b[a.name]&&j(a)};return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,t.jsx)(l.ZP,{icon:(0,t.jsx)(c.Z,{className:"h-4 w-4"}),onClick:()=>h(!d),className:"flex items-center gap-2",children:m}),(0,t.jsx)(l.ZP,{onClick:()=>{let e={};a.forEach(a=>{e[a.name]=""}),p(e),o()},children:"Reset Filters"})]}),d&&(0,t.jsx)("div",{className:"grid grid-cols-3 gap-x-6 gap-y-4 mb-6",children:["Team ID","Status","Organization ID","Key Alias","User ID","End User","Key Hash","Model"].map(e=>{let n=a.find(a=>a.label===e||a.name===e);return n?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("label",{className:"text-sm text-gray-600",children:n.label||n.name}),n.isSearchable?(0,t.jsx)(s.default,{showSearch:!0,className:"w-full",placeholder:"Search ".concat(n.label||n.name,"..."),value:g[n.name]||void 0,onChange:e=>N(n.name,e),onDropdownVisibleChange:e=>k(e,n),onSearch:e=>{C(a=>({...a,[n.name]:e})),n.searchFn&&Z(e,n)},filterOption:!1,loading:v[n.name],options:w[n.name]||[],allowClear:!0,notFoundContent:v[n.name]?"Loading...":"No results found"}):n.options?(0,t.jsx)(s.default,{className:"w-full",placeholder:"Select ".concat(n.label||n.name,"..."),value:g[n.name]||void 0,onChange:e=>N(n.name,e),allowClear:!0,children:n.options.map(e=>(0,t.jsx)(s.default.Option,{value:e.value,children:e.label},e.value))}):(0,t.jsx)(i.default,{className:"w-full",placeholder:"Enter ".concat(n.label||n.name,"..."),value:g[n.name]||"",onChange:e=>N(n.name,e.target.value),allowClear:!0})]},n.name):null})})]})}}},function(e){e.O(0,[3665,1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,5188,1264,1791,8049,131,2202,874,4292,1739,2971,2117,1744],function(){return e(e.s=4222)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/chunks/app/page-d6fb0fb010283014.js b/ui/litellm-dashboard/out/_next/static/chunks/app/page-1e5fd174f829427c.js similarity index 99% rename from ui/litellm-dashboard/out/_next/static/chunks/app/page-d6fb0fb010283014.js rename to ui/litellm-dashboard/out/_next/static/chunks/app/page-1e5fd174f829427c.js index 3a08a8fdba2..db58d4e18d4 100644 --- a/ui/litellm-dashboard/out/_next/static/chunks/app/page-d6fb0fb010283014.js +++ b/ui/litellm-dashboard/out/_next/static/chunks/app/page-1e5fd174f829427c.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{97731:function(e,s,t){Promise.resolve().then(t.bind(t,17940))},23192:function(e,s,t){"use strict";t.d(s,{Z:function(){return h}});var r=t(57437);t(2265);var l=t(67101),a=t(12485),n=t(18135),i=t(35242),o=t(29706),c=t(77991),d=t(84264),m=t(25653),u=t(96362),x=e=>{let{href:s,className:t}=e;return(0,r.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",title:"Open documentation in a new tab",className:function(){for(var e=arguments.length,s=Array(e),t=0;t{let{proxySettings:s}=e,t="";return(null==s?void 0:s.PROXY_BASE_URL)!==void 0&&(null==s?void 0:s.PROXY_BASE_URL)&&(t=s.PROXY_BASE_URL),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(l.Z,{className:"gap-2 p-8 h-[80vh] w-full mt-2",children:(0,r.jsxs)("div",{className:"mb-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",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)(x,{className:"ml-3 shrink-0",href:"https://docs.litellm.ai/docs/proxy/user_keys"})]}),(0,r.jsxs)(d.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)(n.Z,{children:[(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(a.Z,{children:"OpenAI Python SDK"}),(0,r.jsx)(a.Z,{children:"LlamaIndex"}),(0,r.jsx)(a.Z,{children:"Langchain Py"})]}),(0,r.jsxs)(c.Z,{children:[(0,r.jsx)(o.Z,{children:(0,r.jsx)(m.Z,{language:"python",code:'import openai\nclient = openai.OpenAI(\n api_key="your_api_key",\n base_url="'.concat(t,'" # 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)')})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(m.Z,{language:"python",code:'import 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(t,'", # 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(t,'",\n api_key="sk-1234",\n api_version="2023-07-01-preview",\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)')})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(m.Z,{language:"python",code:'from 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(t,'",\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)')})})]})]})]})})})}},25653:function(e,s,t){"use strict";var r=t(57437),l=t(2265),a=t(30401),n=t(5136),i=t(17906),o=t(1479);s.Z=e=>{let{code:s,language:t}=e,[c,d]=(0,l.useState)(!1);return(0,r.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,r.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(s),d(!0),setTimeout(()=>d(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:c?(0,r.jsx)(a.Z,{size:16}):(0,r.jsx)(n.Z,{size:16})}),(0,r.jsx)(i.Z,{language:t,style:o.Z,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:s})]})}},17940:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return s1}});var r=t(57437),l=t(2265),a=t(99376),n=t(14474),i=t(21623),o=t(29827),c=t(65373),d=t(69734),m=t(21739),u=t(81598),x=t(77155),h=t(22004),p=t(90773),g=t(6925),f=t(64289),j=t(7166),y=t(49104),b=t(33801),v=t(18160),_=t(62306),Z=t(23192),w=t(13240),N=t(18143),k=t(66600),S=t(19250),C=t(44734),T=t(30603),z=t(6674),P=t(30874),A=t(39210),D=t(94138),I=t(42273),L=t(6204),E=t(5183),F=t(20831),R=t(12485),M=t(18135),O=t(35242),B=t(29706),q=t(77991),U=t(84264),V=t(96761),K=t(13634),H=t(82680),W=t(9114),Y=t(42673);let J=e=>{let s=Object.keys(Y.fK).find(s=>Y.fK[s]===e);if(s){let e=Y.Cl[s],t=Y.cd[e];return{displayName:e,logo:t,enumKey:s}}return{displayName:e,logo:"",enumKey:null}},G=e=>Y.fK[e]||null,X=(e,s)=>{let t=e.target,r=t.parentElement;if(r){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),r.replaceChild(e,t)}};var $=t(47323),Q=t(49566),ee=t(82422),es=t(3837),et=t(53410),er=t(74998),el=t(21626),ea=t(97214),en=t(28241),ei=t(58834),eo=t(69552),ec=t(71876);function ed(e){let{data:s,columns:t,isLoading:l=!1,loadingMessage:a="Loading...",emptyMessage:n="No data",getRowKey:i}=e;return(0,r.jsxs)(el.Z,{children:[(0,r.jsx)(ei.Z,{children:(0,r.jsx)(ec.Z,{children:t.map((e,s)=>(0,r.jsx)(eo.Z,{style:{width:e.width},children:e.header},s))})}),(0,r.jsx)(ea.Z,{children:l?(0,r.jsx)(ec.Z,{children:(0,r.jsx)(en.Z,{colSpan:t.length,className:"text-center",children:(0,r.jsx)(U.Z,{className:"text-gray-500",children:a})})}):s.length>0?s.map((e,s)=>(0,r.jsx)(ec.Z,{children:t.map((s,t)=>{var l;return(0,r.jsx)(en.Z,{children:s.cell?s.cell(e):String(null!==(l=e[s.accessor])&&void 0!==l?l:"")},t)})},i?i(e,s):s)):(0,r.jsx)(ec.Z,{children:(0,r.jsx)(en.Z,{colSpan:t.length,className:"text-center",children:(0,r.jsx)(U.Z,{className:"text-gray-500",children:n})})})})]})}var em=e=>{let{discountConfig:s,onDiscountChange:t,onRemoveProvider:a}=e,[n,i]=(0,l.useState)(null),[o,c]=(0,l.useState)(""),d=(e,s)=>{i(e),c((100*s).toString())},m=e=>{let s=parseFloat(o);!isNaN(s)&&s>=0&&s<=100&&t(e,(s/100).toString()),i(null),c("")},u=()=>{i(null),c("")},x=(e,s)=>{"Enter"===e.key?m(s):"Escape"===e.key&&u()},h=Object.entries(s).map(e=>{let[s,t]=e;return{provider:s,discount:t}}).sort((e,s)=>{let t=J(e.provider).displayName,r=J(s.provider).displayName;return t.localeCompare(r)});return(0,r.jsx)(ed,{data:h,columns:[{header:"Provider",cell:e=>{let{displayName:s,logo:t}=J(e.provider);return(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,r.jsx)("img",{src:t,alt:"".concat(s," logo"),className:"w-5 h-5",onError:e=>X(e,s)}),(0,r.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Discount Percentage",cell:e=>(0,r.jsx)("div",{className:"flex items-center gap-2",children:n===e.provider?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Q.Z,{value:o,onValueChange:c,onKeyDown:s=>x(s,e.provider),placeholder:"5",className:"w-20",autoFocus:!0}),(0,r.jsx)("span",{className:"text-gray-600",children:"%"}),(0,r.jsx)($.Z,{icon:ee.Z,size:"sm",onClick:()=>m(e.provider),className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,r.jsx)($.Z,{icon:es.Z,size:"sm",onClick:u,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(U.Z,{className:"font-medium",children:[(100*e.discount).toFixed(1),"%"]}),(0,r.jsx)($.Z,{icon:et.Z,size:"sm",onClick:()=>d(e.provider,e.discount),className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"250px"},{header:"Actions",cell:e=>{let{displayName:s}=J(e.provider);return(0,r.jsx)($.Z,{icon:er.Z,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider discounts configured"})},eu=t(64504),ex=t(89970),eh=t(52787),ep=t(15424),eg=t(33145),ef=e=>{let{discountConfig:s,selectedProvider:t,newDiscount:l,onProviderChange:a,onDiscountChange:n,onAddProvider:i}=e;return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,r.jsx)(ex.Z,{title:"Select the LLM provider you want to configure a discount for",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,r.jsx)(eh.default,{showSearch:!0,placeholder:"Select provider",value:t,onChange:a,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,s)=>{var t;return String(null!==(t=null==s?void 0:s.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},children:Object.entries(Y.Cl).map(e=>{let[t,l]=e,a=Y.fK[t];return a&&s[a]?null:(0,r.jsx)(eh.default.Option,{value:t,label:l,children:(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(eg.default,{src:Y.cd[l],alt:"".concat(t," logo"),width:20,height:20,className:"w-5 h-5",onError:e=>X(e,l)}),(0,r.jsx)("span",{children:l})]})},t)})})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Discount Percentage",(0,r.jsx)(ex.Z,{title:"Enter a percentage value (e.g., 5 for 5% discount)",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a discount percentage"}],children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(eu.o,{placeholder:"5",value:l,onValueChange:n,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,r.jsx)("span",{className:"text-gray-600",children:"%"})]})}),(0,r.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,r.jsx)(eu.z,{variant:"primary",onClick:i,disabled:!t||!l,children:"Add Provider Discount"})})]})},ej=t(29271),ey=t(40875),eb=t(96362);let ev=e=>{let{items:s,children:t="Docs",className:a=""}=e,[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&i(!1)};return n&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[n]),(0,r.jsxs)("div",{className:"relative inline-block ".concat(a),ref:o,children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!n),className:"inline-flex items-center gap-1 text-gray-500 hover:text-gray-700 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded px-2 py-1","aria-expanded":n,"aria-haspopup":"true",children:[(0,r.jsx)("span",{children:t}),(0,r.jsx)(ey.Z,{className:"h-3 w-3 transition-transform ".concat(n?"rotate-180":""),"aria-hidden":"true"})]}),n&&(0,r.jsx)("div",{className:"absolute right-0 mt-1 w-56 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:s.map((e,s)=>(0,r.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>i(!1),children:[(0,r.jsx)("span",{children:e.label}),(0,r.jsx)(eb.Z,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 ml-2","aria-hidden":"true"})]},s))})]})};var e_=t(56522),eZ=t(25653),ew=()=>{let[e,s]=(0,l.useState)(""),[t,a]=(0,l.useState)(""),n=(0,l.useMemo)(()=>{let s=parseFloat(e),r=parseFloat(t);if(isNaN(s)||isNaN(r)||0===s||0===r)return null;let l=s+r;return{originalCost:l.toFixed(10),finalCost:s.toFixed(10),discountAmount:r.toFixed(10),discountPercentage:(r/l*100).toFixed(2)}},[e,t]);return(0,r.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-1",children:"Cost Calculation"}),(0,r.jsxs)(e_.x,{className:"text-xs text-gray-600",children:["Discounts are applied to provider costs: ",(0,r.jsx)("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs",children:"final_cost = base_cost \xd7 (1 - discount%/100)"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-1",children:"Example"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"A 5% discount on a $10.00 request results in: $10.00 \xd7 (1 - 0.05) = $9.50"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-1",children:"Valid Range"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"Discount percentages must be between 0% and 100%"})]}),(0,r.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-2",children:"Validating Discounts"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600 mb-3",children:"Make a test request and check the response headers to verify discounts are applied:"}),(0,r.jsx)(eZ.Z,{language:"bash",code:'curl -X POST -i http://your-proxy:4000/chat/completions \\\n -H "Content-Type: application/json" \\\n -H "Authorization: Bearer sk-1234" \\\n -d \'{\n "model": "gemini/gemini-2.5-pro",\n "messages": [{"role": "user", "content": "Hello"}]\n }\''}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600 mt-3 mb-2",children:"Look for these headers in the response:"}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"Final cost after discount"})]}),(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-original"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"Original cost before discount"})]}),(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-discount-amount"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"Amount discounted"})]})]})]}),(0,r.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-3",children:"Discount Calculator"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600 mb-3",children:"Enter values from your response headers to verify the discount:"}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Response Cost (x-litellm-response-cost)"}),(0,r.jsx)(e_.o,{placeholder:"0.0171938125",value:e,onValueChange:s,className:"text-sm"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Discount Amount (x-litellm-response-cost-discount-amount)"}),(0,r.jsx)(e_.o,{placeholder:"0.0009049375",value:t,onValueChange:a,className:"text-sm"})]})]}),n&&(0,r.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,r.jsx)(e_.x,{className:"text-sm font-medium text-blue-900 mb-2",children:"Calculated Results"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(e_.x,{className:"text-xs text-blue-800",children:"Original Cost:"}),(0,r.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",n.originalCost]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(e_.x,{className:"text-xs text-blue-800",children:"Final Cost:"}),(0,r.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",n.finalCost]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(e_.x,{className:"text-xs text-blue-800",children:"Discount Amount:"}),(0,r.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",n.discountAmount]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-blue-300",children:[(0,r.jsx)(e_.x,{className:"text-xs font-semibold text-blue-900",children:"Discount Applied:"}),(0,r.jsxs)(e_.x,{className:"text-sm font-bold text-blue-900",children:[n.discountPercentage,"%"]})]})]})]})]})]})};let eN=[{label:"Custom pricing for models",href:"https://docs.litellm.ai/docs/proxy/custom_pricing"},{label:"Spend tracking",href:"https://docs.litellm.ai/docs/proxy/cost_tracking"}];var ek=e=>{let{userID:s,userRole:t,accessToken:a}=e,[n,i]=(0,l.useState)({}),[o,c]=(0,l.useState)(void 0),[d,m]=(0,l.useState)(""),[u,x]=(0,l.useState)(!0),[h,p]=(0,l.useState)(!1),[g]=K.Z.useForm(),[f,j]=H.Z.useModal(),y=(0,l.useCallback)(async()=>{x(!0);try{let e=(0,S.getProxyBaseUrl)(),s=await fetch(e?"".concat(e,"/config/cost_discount_config"):"/config/cost_discount_config",{method:"GET",headers:{Authorization:"Bearer ".concat(a),"Content-Type":"application/json"}});if(s.ok){let e=await s.json();i(e.values||{})}else console.error("Failed to fetch discount config")}catch(e){console.error("Error fetching discount config:",e),W.Z.fromBackend("Failed to fetch discount configuration")}finally{x(!1)}},[a]);(0,l.useEffect)(()=>{a&&y()},[a,y]);let b=async e=>{try{let t=(0,S.getProxyBaseUrl)(),r=await fetch(t?"".concat(t,"/config/cost_discount_config"):"/config/cost_discount_config",{method:"PATCH",headers:{Authorization:"Bearer ".concat(a),"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok)W.Z.success("Discount configuration updated successfully"),await y();else{var s;let e=await r.json(),t=(null===(s=e.detail)||void 0===s?void 0:s.error)||e.detail||"Failed to update settings";W.Z.fromBackend(t)}}catch(e){console.error("Error updating discount config:",e),W.Z.fromBackend("Failed to update discount configuration")}},v=async()=>{if(!o||!d){W.Z.fromBackend("Please select a provider and enter discount percentage");return}let e=parseFloat(d);if(isNaN(e)||e<0||e>100){W.Z.fromBackend("Discount must be between 0% and 100%");return}let s=G(o);if(!s){W.Z.fromBackend("Invalid provider selected");return}if(n[s]){W.Z.fromBackend("Discount for ".concat(Y.Cl[o]," already exists. Edit it in the table above."));return}let t={...n,[s]:e/100};i(t),await b(t),c(void 0),m(""),p(!1)},_=async(e,s)=>{f.confirm({title:"Remove Provider Discount",icon:(0,r.jsx)(ej.Z,{}),content:"Are you sure you want to remove the discount for ".concat(s,"?"),okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:async()=>{let s={...n};delete s[e],i(s),await b(s)}})},Z=async(e,s)=>{let t=parseFloat(s);if(!isNaN(t)&&t>=0&&t<=1){let s={...n,[e]:t};i(s),await b(s)}};return a?(0,r.jsxs)("div",{className:"w-full p-8",children:[j,(0,r.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between mb-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(V.Z,{children:"Cost Tracking Settings"}),(0,r.jsx)(ev,{items:eN})]}),(0,r.jsx)(U.Z,{className:"text-gray-500 mt-1",children:"Configure cost discounts for different LLM providers. Changes are saved automatically."})]}),(0,r.jsx)(F.Z,{onClick:()=>p(!0),className:"mt-4 md:mt-0",children:"+ Add Provider Discount"})]}),(0,r.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full",children:(0,r.jsxs)(M.Z,{children:[(0,r.jsxs)(O.Z,{className:"px-6 pt-4",children:[(0,r.jsx)(R.Z,{children:"Provider Discounts"}),(0,r.jsx)(R.Z,{children:"Test It"})]}),(0,r.jsxs)(q.Z,{children:[(0,r.jsx)(B.Z,{children:u?(0,r.jsx)("div",{className:"py-12 text-center",children:(0,r.jsx)(U.Z,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(n).length>0?(0,r.jsx)("div",{className:"p-6",children:(0,r.jsx)(em,{discountConfig:n,onDiscountChange:Z,onRemoveProvider:_})}):(0,r.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,r.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)(U.Z,{className:"text-gray-700 font-medium mb-2",children:"No provider discounts configured"}),(0,r.jsx)(U.Z,{className:"text-gray-500 text-sm",children:'Click "Add Provider Discount" to get started'})]})}),(0,r.jsx)(B.Z,{children:(0,r.jsx)("div",{className:"px-6 pb-4",children:(0,r.jsx)(ew,{})})})]})]})}),(0,r.jsx)(H.Z,{title:(0,r.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Discount"})}),open:h,width:1e3,onCancel:()=>{p(!1),g.resetFields(),c(void 0),m("")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)(U.Z,{className:"text-sm text-gray-600 mb-6",children:"Select a provider and set its discount percentage. Enter a value between 0% and 100% (e.g., 5 for a 5% discount)."}),(0,r.jsx)(K.Z,{form:g,onFinish:e=>{v()},layout:"vertical",className:"space-y-6",children:(0,r.jsx)(ef,{discountConfig:n,selectedProvider:o,newDiscount:d,onProviderChange:c,onDiscountChange:m,onAddProvider:v})})]})})]}):null},eS=t(91323),eC=t(10012),eT=t(31857),ez=t(19226),eP=t(45937),eA=t(92403),eD=t(28595),eI=t(68208),eL=t(9775),eE=t(41361),eF=t(37527),eR=t(15883),eM=t(12660),eO=t(88009),eB=t(48231),eq=t(57400),eU=t(58630),eV=t(29436),eK=t(44625),eH=t(41169),eW=t(38434),eY=t(71891),eJ=t(55322),eG=t(11429),eX=t(20347),e$=t(79262),eQ=t(13959);let{Sider:e0}=ez.default;var e1=e=>{let{accessToken:s,setPage:t,userRole:l,defaultSelectedKey:a,collapsed:n=!1}=e,i=[{key:"1",page:"api-keys",label:"Virtual Keys",icon:(0,r.jsx)(eA.Z,{style:{fontSize:"18px"}})},{key:"3",page:"llm-playground",label:"Test Key",icon:(0,r.jsx)(eD.Z,{style:{fontSize:"18px"}}),roles:eX.LQ},{key:"2",page:"models",label:"Models + Endpoints",icon:(0,r.jsx)(eI.Z,{style:{fontSize:"18px"}}),roles:eX.LQ},{key:"12",page:"new_usage",label:"Usage",icon:(0,r.jsx)(eL.Z,{style:{fontSize:"18px"}}),roles:[...eX.ZL,...eX.lo]},{key:"6",page:"teams",label:"Teams",icon:(0,r.jsx)(eE.Z,{style:{fontSize:"18px"}})},{key:"17",page:"organizations",label:"Organizations",icon:(0,r.jsx)(eF.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"5",page:"users",label:"Internal Users",icon:(0,r.jsx)(eR.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"14",page:"api_ref",label:"API Reference",icon:(0,r.jsx)(eM.Z,{style:{fontSize:"18px"}})},{key:"16",page:"model-hub-table",label:"Model Hub",icon:(0,r.jsx)(eO.Z,{style:{fontSize:"18px"}})},{key:"15",page:"logs",label:"Logs",icon:(0,r.jsx)(eB.Z,{style:{fontSize:"18px"}})},{key:"11",page:"guardrails",label:"Guardrails",icon:(0,r.jsx)(eq.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"26",page:"tools",label:"Tools",icon:(0,r.jsx)(eU.Z,{style:{fontSize:"18px"}}),children:[{key:"18",page:"mcp-servers",label:"MCP Servers",icon:(0,r.jsx)(eU.Z,{style:{fontSize:"18px"}})},{key:"28",page:"search-tools",label:"Search Tools",icon:(0,r.jsx)(eV.Z,{style:{fontSize:"18px"}})},{key:"21",page:"vector-stores",label:"Vector Stores",icon:(0,r.jsx)(eK.Z,{style:{fontSize:"18px"}}),roles:eX.ZL}]},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,r.jsx)(eH.Z,{style:{fontSize:"18px"}}),children:[{key:"9",page:"caching",label:"Caching",icon:(0,r.jsx)(eK.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"25",page:"prompts",label:"Prompts",icon:(0,r.jsx)(eW.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"10",page:"budgets",label:"Budgets",icon:(0,r.jsx)(eF.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"20",page:"transform-request",label:"API Playground",icon:(0,r.jsx)(eM.Z,{style:{fontSize:"18px"}}),roles:[...eX.ZL,...eX.lo]},{key:"19",page:"tag-management",label:"Tag Management",icon:(0,r.jsx)(eY.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"4",page:"usage",label:"Old Usage",icon:(0,r.jsx)(eL.Z,{style:{fontSize:"18px"}})}]},{key:"settings",page:"settings",label:"Settings",icon:(0,r.jsx)(eJ.Z,{style:{fontSize:"18px"}}),roles:eX.ZL,children:[{key:"11",page:"general-settings",label:"Router Settings",icon:(0,r.jsx)(eJ.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"8",page:"settings",label:"Logging & Alerts",icon:(0,r.jsx)(eJ.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"13",page:"admin-panel",label:"Admin Settings",icon:(0,r.jsx)(eJ.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"27",page:"cost-tracking-settings",label:"Cost Tracking",icon:(0,r.jsx)(eL.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"14",page:"ui-theme",label:"UI Theme",icon:(0,r.jsx)(eG.Z,{style:{fontSize:"18px"}}),roles:eX.ZL}]}],o=(e=>{let s=i.find(s=>s.page===e);if(s)return s.key;for(let s of i)if(s.children){let t=s.children.find(s=>s.page===e);if(t)return t.key}return"1"})(a),c=i.filter(e=>{let s=!e.roles||e.roles.includes(l);return console.log("Menu item ".concat(e.label,": roles=").concat(e.roles,", userRole=").concat(l,", hasAccess=").concat(s)),!!s&&(e.children&&(e.children=e.children.filter(e=>!e.roles||e.roles.includes(l))),!0)});return(0,r.jsx)(ez.default,{style:{minHeight:"100vh"},children:(0,r.jsxs)(e0,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,r.jsx)(eQ.ZP,{theme:{components:{Menu:{iconSize:18,fontSize:14}}},children:(0,r.jsx)(eP.Z,{mode:"inline",selectedKeys:[o],defaultOpenKeys:n?[]:["llm-tools"],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"14px"},items:c.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())),t(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())),t(e.page)}}})})}),(0,eX.tY)(l)&&!n&&(0,r.jsx)(e$.Z,{accessToken:s,width:220})]})})},e2=t(92019),e4=t(39760),e6=e=>{let{setPage:s,defaultSelectedKey:t,sidebarCollapsed:l}=e,{refactoredUIFlag:a}=(0,eT.Z)(),{accessToken:n,userRole:i}=(0,e4.Z)();return a?(0,r.jsx)(e2.Z,{accessToken:n,defaultSelectedKey:t,userRole:i}):(0,r.jsx)(e1,{accessToken:n,setPage:s,userRole:i,defaultSelectedKey:t,collapsed:l})},e5=t(93192),e3=t(23628),e8=t(86462),e9=t(47686),e7=t(64482),se=t(73002),ss=t(24199),st=t(46468),sr=t(25512),sl=t(33293),sa=t(88904),sn=t(87452),si=t(88829),so=t(72208),sc=t(41649),sd=t(12514),sm=t(49804),su=t(67101),sx=t(918),sh=t(97415),sp=t(2597),sg=t(59872),sf=t(32489),sj=t(76865),sy=t(95920),sb=t(68473),sv=t(51750);let s_=(e,s)=>{let t=[];return e&&e.models.length>0?(console.log("organization.models: ".concat(e.models)),t=e.models):t=s,(0,st.Ob)(t,s)},sZ=(e,s,t)=>"Admin"===e||!!t&&!!s&&t.some(e=>{var t;return null===(t=e.members)||void 0===t?void 0:t.some(e=>e.user_id===s&&"org_admin"===e.user_role)}),sw=(e,s,t)=>"Admin"===e?t||[]:t&&s?t.filter(e=>{var t;return null===(t=e.members)||void 0===t?void 0:t.some(e=>e.user_id===s&&"org_admin"===e.user_role)}):[];var sN=e=>{let{teams:s,searchParams:t,accessToken:a,setTeams:n,userID:i,userRole:o,organizations:c,premiumUser:d=!1}=e;console.log("organizations: ".concat(JSON.stringify(c)));let[m,u]=(0,l.useState)(""),[x,h]=(0,l.useState)(null),[p,g]=(0,l.useState)(null),[f,j]=(0,l.useState)(!1),[y,b]=(0,l.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"});(0,l.useEffect)(()=>{console.log("inside useeffect - ".concat(m)),a&&(0,A.Z)(a,i,o,x,n),eB()},[m]);let[v]=K.Z.useForm(),[_]=K.Z.useForm(),{Title:Z,Paragraph:w}=e5.default,[N,k]=(0,l.useState)(""),[C,T]=(0,l.useState)(!1),[z,P]=(0,l.useState)(null),[D,I]=(0,l.useState)(null),[L,E]=(0,l.useState)(!1),[V,Y]=(0,l.useState)(!1),[J,G]=(0,l.useState)(!1),[X,ee]=(0,l.useState)(!1),[es,ed]=(0,l.useState)([]),[em,eu]=(0,l.useState)(!1),[eg,ef]=(0,l.useState)(null),[ej,ey]=(0,l.useState)([]),[eb,ev]=(0,l.useState)({}),[e_,eZ]=(0,l.useState)([]),[ew,eN]=(0,l.useState)({}),[ek,eS]=(0,l.useState)([]),[eC,eT]=(0,l.useState)([]),[ez,eP]=(0,l.useState)(!1),[eA,eD]=(0,l.useState)(""),[eI,eL]=(0,l.useState)({});(0,l.useEffect)(()=>{console.log("currentOrgForCreateTeam: ".concat(p));let e=s_(p,es);console.log("models: ".concat(e)),ey(e),v.setFieldValue("models",[])},[p,es]),(0,l.useEffect)(()=>{if(V){let e=sw(o,i,c);if(1===e.length){let s=e[0];v.setFieldValue("organization_id",s.organization_id),g(s)}else v.setFieldValue("organization_id",(null==x?void 0:x.organization_id)||null),g(x)}},[V,o,i,c,x]),(0,l.useEffect)(()=>{(async()=>{try{if(null==a)return;let e=(await (0,S.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);eZ(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[a]);let eE=async()=>{try{if(null==a)return;let e=await (0,S.fetchMCPAccessGroups)(a);eT(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,l.useEffect)(()=>{eE()},[a]),(0,l.useEffect)(()=>{s&&ev(s.reduce((e,s)=>(e[s.team_id]={keys:s.keys||[],team_info:{members_with_roles:s.members_with_roles||[]}},e),{}))},[s]);let eF=async e=>{ef(e),eu(!0)},eR=async()=>{if(null!=eg&&null!=s&&null!=a){try{await (0,S.teamDeleteCall)(a,eg),(0,A.Z)(a,i,o,x,n)}catch(e){console.error("Error deleting the team:",e)}eu(!1),ef(null)}},eM=()=>{eu(!1),ef(null)};(0,l.useEffect)(()=>{(async()=>{try{if(null===i||null===o||null===a)return;let e=await (0,st.K2)(i,o,a);e&&ed(e)}catch(e){console.error("Error fetching user models:",e)}})()},[a,i,o,s]);let eO=async e=>{try{if(console.log("formValues: ".concat(JSON.stringify(e))),null!=a){var t,r,l;let i=null==e?void 0:e.team_alias,o=null!==(l=null==s?void 0:s.map(e=>e.team_alias))&&void 0!==l?l:[],c=(null==e?void 0:e.organization_id)||(null==x?void 0:x.organization_id);if(""===c||"string"!=typeof c?e.organization_id=null:e.organization_id=c.trim(),o.includes(i))throw Error("Team alias ".concat(i," already exists, please pick another alias"));if(W.Z.info("Creating Team"),ek.length>0){let s={};if(e.metadata)try{s=JSON.parse(e.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}s={...s,logging:ek.filter(e=>e.callback_name)},e.metadata=JSON.stringify(s)}if(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||e.allowed_mcp_servers_and_groups&&((null===(t=e.allowed_mcp_servers_and_groups.servers)||void 0===t?void 0:t.length)>0||(null===(r=e.allowed_mcp_servers_and_groups.accessGroups)||void 0===r?void 0:r.length)>0||e.allowed_mcp_servers_and_groups.toolPermissions)){if(e.object_permission={},e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission.vector_stores=e.allowed_vector_store_ids,delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups){let{servers:s,accessGroups:t}=e.allowed_mcp_servers_and_groups;s&&s.length>0&&(e.object_permission.mcp_servers=s),t&&t.length>0&&(e.object_permission.mcp_access_groups=t),delete e.allowed_mcp_servers_and_groups}e.mcp_tool_permissions&&Object.keys(e.mcp_tool_permissions).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=e.mcp_tool_permissions,delete e.mcp_tool_permissions)}e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),Object.keys(eI).length>0&&(e.model_aliases=eI);let d=await (0,S.teamCreateCall)(a,e);null!==s?n([...s,d]):n([d]),console.log("response for team create call: ".concat(d)),W.Z.success("Team created"),v.resetFields(),eS([]),eL({}),Y(!1)}}catch(e){console.error("Error creating the team:",e),W.Z.fromBackend("Error creating the team: "+e)}},eB=()=>{u(new Date().toLocaleString())},eq=(e,s)=>{let t={...y,[e]:s};b(t),a&&(0,S.v2TeamListCall)(a,t.organization_id||null,null,t.team_id||null,t.team_alias||null).then(e=>{e&&e.teams&&n(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})};return(0,r.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,r.jsx)(su.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,r.jsxs)(sm.Z,{numColSpan:1,className:"flex flex-col gap-2",children:[sZ(o,i,c)&&(0,r.jsx)(F.Z,{className:"w-fit",onClick:()=>Y(!0),children:"+ Create New Team"}),D?(0,r.jsx)(sl.Z,{teamId:D,onUpdate:e=>{n(s=>{if(null==s)return s;let t=s.map(s=>e.team_id===s.team_id?(0,sg.nl)(s,e):s);return a&&(0,A.Z)(a,i,o,x,n),t})},onClose:()=>{I(null),E(!1)},accessToken:a,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let s=0;se.team_id===D)),is_proxy_admin:"Admin"==o,userModels:es,editTeam:L}):(0,r.jsxs)(M.Z,{className:"gap-2 h-[75vh] w-full",children:[(0,r.jsxs)(O.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)(R.Z,{children:"Your Teams"}),(0,r.jsx)(R.Z,{children:"Available Teams"}),(0,eX.tY)(o||"")&&(0,r.jsx)(R.Z,{children:"Default Team Settings"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[m&&(0,r.jsxs)(U.Z,{children:["Last Refreshed: ",m]}),(0,r.jsx)($.Z,{icon:e3.Z,variant:"shadow",size:"xs",className:"self-center",onClick:eB})]})]}),(0,r.jsxs)(q.Z,{children:[(0,r.jsxs)(B.Z,{children:[(0,r.jsxs)(U.Z,{children:["Click on “Team ID” to view team details ",(0,r.jsx)("b",{children:"and"})," manage team members."]}),(0,r.jsx)(su.Z,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,r.jsx)(sm.Z,{numColSpan:1,children:(0,r.jsxs)(sd.Z,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,r.jsx)("div",{className:"border-b px-6 py-4",children:(0,r.jsxs)("div",{className:"flex flex-col space-y-4",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 Team Name...",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:y.team_alias,onChange:e=>eq("team_alias",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)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ".concat(f?"bg-gray-100":""),onClick:()=>j(!f),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"})}),"Filters",(y.team_id||y.team_alias||y.organization_id)&&(0,r.jsx)("span",{className:"w-2 h-2 rounded-full bg-blue-500"})]}),(0,r.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:()=>{b({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),a&&(0,S.v2TeamListCall)(a,null,i||null,null,null).then(e=>{e&&e.teams&&n(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})},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:"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"})}),"Reset Filters"]})]}),f&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,r.jsxs)("div",{className:"relative w-64",children:[(0,r.jsx)("input",{type:"text",placeholder:"Enter Team 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:y.team_id,onChange:e=>eq("team_id",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:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),(0,r.jsx)("div",{className:"w-64",children:(0,r.jsx)(sr.P,{value:y.organization_id||"",onValueChange:e=>eq("organization_id",e),placeholder:"Select Organization",children:null==c?void 0:c.map(e=>(0,r.jsx)(sr.Q,{value:e.organization_id||"",children:e.organization_alias||e.organization_id},e.organization_id))})})]})]})}),(0,r.jsxs)(el.Z,{children:[(0,r.jsx)(ei.Z,{children:(0,r.jsxs)(ec.Z,{children:[(0,r.jsx)(eo.Z,{children:"Team Name"}),(0,r.jsx)(eo.Z,{children:"Team ID"}),(0,r.jsx)(eo.Z,{children:"Created"}),(0,r.jsx)(eo.Z,{children:"Spend (USD)"}),(0,r.jsx)(eo.Z,{children:"Budget (USD)"}),(0,r.jsx)(eo.Z,{children:"Models"}),(0,r.jsx)(eo.Z,{children:"Organization"}),(0,r.jsx)(eo.Z,{children:"Info"})]})}),(0,r.jsx)(ea.Z,{children:s&&s.length>0?s.filter(e=>!x||e.organization_id===x.organization_id).sort((e,s)=>new Date(s.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,r.jsxs)(ec.Z,{children:[(0,r.jsx)(en.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,r.jsx)(en.Z,{children:(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsx)(ex.Z,{title:e.team_id,children:(0,r.jsxs)(F.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:()=>{I(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,r.jsx)(en.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,r.jsx)(en.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:(0,sg.pw)(e.spend,4)}),(0,r.jsx)(en.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)(en.Z,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:e.models.length>3?"px-0":"",children:(0,r.jsx)("div",{className:"flex flex-col",children:Array.isArray(e.models)?(0,r.jsx)("div",{className:"flex flex-col",children:0===e.models.length?(0,r.jsx)(sc.Z,{size:"xs",className:"mb-1",color:"red",children:(0,r.jsx)(U.Z,{children:"All Proxy Models"})}):(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex items-start",children:[e.models.length>3&&(0,r.jsx)("div",{children:(0,r.jsx)($.Z,{icon:ew[e.team_id]?e8.Z:e9.Z,className:"cursor-pointer",size:"xs",onClick:()=>{eN(s=>({...s,[e.team_id]:!s[e.team_id]}))}})}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.models.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,r.jsx)(sc.Z,{size:"xs",color:"red",children:(0,r.jsx)(U.Z,{children:"All Proxy Models"})},s):(0,r.jsx)(sc.Z,{size:"xs",color:"blue",children:(0,r.jsx)(U.Z,{children:e.length>30?"".concat((0,st.W0)(e).slice(0,30),"..."):(0,st.W0)(e)})},s)),e.models.length>3&&!ew[e.team_id]&&(0,r.jsx)(sc.Z,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,r.jsxs)(U.Z,{children:["+",e.models.length-3," ",e.models.length-3==1?"more model":"more models"]})}),ew[e.team_id]&&(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:e.models.slice(3).map((e,s)=>"all-proxy-models"===e?(0,r.jsx)(sc.Z,{size:"xs",color:"red",children:(0,r.jsx)(U.Z,{children:"All Proxy Models"})},s+3):(0,r.jsx)(sc.Z,{size:"xs",color:"blue",children:(0,r.jsx)(U.Z,{children:e.length>30?"".concat((0,st.W0)(e).slice(0,30),"..."):(0,st.W0)(e)})},s+3))})]})]})})}):null})}),(0,r.jsx)(en.Z,{children:e.organization_id}),(0,r.jsxs)(en.Z,{children:[(0,r.jsxs)(U.Z,{children:[eb&&e.team_id&&eb[e.team_id]&&eb[e.team_id].keys&&eb[e.team_id].keys.length," ","Keys"]}),(0,r.jsxs)(U.Z,{children:[eb&&e.team_id&&eb[e.team_id]&&eb[e.team_id].team_info&&eb[e.team_id].team_info.members_with_roles&&eb[e.team_id].team_info.members_with_roles.length," ","Members"]})]}),(0,r.jsx)(en.Z,{children:"Admin"==o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)($.Z,{icon:et.Z,size:"sm",onClick:()=>{I(e.team_id),E(!0)}}),(0,r.jsx)($.Z,{onClick:()=>eF(e.team_id),icon:er.Z,size:"sm"})]}):null})]},e.team_id)):null})]}),em&&(()=>{var e;let t=null==s?void 0:s.find(e=>e.team_id===eg),l=(null==t?void 0:t.team_alias)||"",a=(null==t?void 0:null===(e=t.keys)||void 0===e?void 0:e.length)||0,n=eA===l;return(0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl min-h-[380px] py-6 overflow-hidden transform transition-all flex flex-col justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Delete Team"}),(0,r.jsx)("button",{onClick:()=>{eM(),eD("")},className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:(0,r.jsx)(sf.Z,{size:20})})]}),(0,r.jsxs)("div",{className:"px-6 py-4",children:[a>0&&(0,r.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,r.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,r.jsx)(sj.Z,{size:20})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-base font-medium text-red-600",children:["Warning: This team has ",a," associated key",a>1?"s":"","."]}),(0,r.jsx)("p",{className:"text-base text-red-600 mt-2",children:"Deleting the team will also delete all associated keys. This action is irreversible."})]})]}),(0,r.jsx)("p",{className:"text-base text-gray-600 mb-5",children:"Are you sure you want to force delete this team and all its keys?"}),(0,r.jsxs)("div",{className:"mb-5",children:[(0,r.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,r.jsx)("span",{className:"underline",children:l})," to confirm deletion:"]}),(0,r.jsx)("input",{type:"text",value:eA,onChange:e=>eD(e.target.value),placeholder:"Enter team name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]})]})]}),(0,r.jsxs)("div",{className:"px-6 py-4 bg-gray-50 flex justify-end gap-4",children:[(0,r.jsx)("button",{onClick:()=>{eM(),eD("")},className:"px-5 py-3 bg-white border border-gray-300 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Cancel"}),(0,r.jsx)("button",{onClick:eR,disabled:!n,className:"px-5 py-3 rounded-md text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 ".concat(n?"bg-red-600 hover:bg-red-700":"bg-red-300 cursor-not-allowed"),children:"Force Delete"})]})]})})})()]})})})]}),(0,r.jsx)(B.Z,{children:(0,r.jsx)(sx.Z,{accessToken:a,userID:i})}),(0,eX.tY)(o||"")&&(0,r.jsx)(B.Z,{children:(0,r.jsx)(sa.Z,{accessToken:a,userID:i||"",userRole:o||""})})]})]}),sZ(o,i,c)&&(0,r.jsx)(H.Z,{title:"Create Team",visible:V,width:1e3,footer:null,onOk:()=>{Y(!1),v.resetFields(),eS([]),eL({})},onCancel:()=>{Y(!1),v.resetFields(),eS([]),eL({})},children:(0,r.jsxs)(K.Z,{form:v,onFinish:eO,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(K.Z.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,r.jsx)(Q.Z,{placeholder:""})}),(()=>{let e=sw(o,i,c),s="Admin"!==o,t=1===e.length,l=0===e.length;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Organization"," ",(0,r.jsx)(ex.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)(ep.Z,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:x?x.organization_id:null,className:"mt-8",rules:s?[{required:!0,message:"Please select an organization"}]:[],help:t?"You can only create teams within this organization":s?"required":"",children:(0,r.jsx)(eh.default,{showSearch:!0,allowClear:!s,disabled:t,placeholder:l?"No organizations available":"Search or select an Organization",onChange:s=>{v.setFieldValue("organization_id",s),g((null==e?void 0:e.find(e=>e.organization_id===s))||null)},filterOption:(e,s)=>{var t;return!!s&&((null===(t=s.children)||void 0===t?void 0:t.toString())||"").toLowerCase().includes(e.toLowerCase())},optionFilterProp:"children",children:null==e?void 0:e.map(e=>(0,r.jsxs)(eh.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))})}),s&&!t&&e.length>1&&(0,r.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,r.jsx)(U.Z,{className:"text-blue-800 text-sm",children:"Please select an organization to create a team for. You can only create teams within organizations where you are an admin."})})]})})(),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Models"," ",(0,r.jsx)(ex.Z,{title:"These are the models that your selected team has access to",children:(0,r.jsx)(ep.Z,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,r.jsxs)(eh.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,r.jsx)(eh.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),ej.map(e=>(0,r.jsx)(eh.default.Option,{value:e,children:(0,st.W0)(e)},e))]})}),(0,r.jsx)(K.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(ss.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(K.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(eh.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(eh.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(eh.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(eh.default.Option,{value:"30d",children:"monthly"})]})}),(0,r.jsx)(K.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,r.jsx)(ss.Z,{step:1,width:400})}),(0,r.jsx)(K.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,r.jsx)(ss.Z,{step:1,width:400})}),(0,r.jsxs)(sn.Z,{className:"mt-20 mb-8",onClick:()=>{ez||(eE(),eP(!0))},children:[(0,r.jsx)(so.Z,{children:(0,r.jsx)("b",{children:"Additional Settings"})}),(0,r.jsxs)(si.Z,{children:[(0,r.jsx)(K.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)(Q.Z,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,r.jsx)(K.Z.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,r.jsx)(ss.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(K.Z.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,r.jsx)(Q.Z,{placeholder:"e.g., 30d"})}),(0,r.jsx)(K.Z.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,r.jsx)(ss.Z,{step:1,width:400})}),(0,r.jsx)(K.Z.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,r.jsx)(ss.Z,{step:1,width:400})}),(0,r.jsx)(K.Z.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,r.jsx)(e7.default.TextArea,{rows:4})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Guardrails"," ",(0,r.jsx)(ex.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)(ep.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,r.jsx)(eh.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:e_.map(e=>({value:e,label:e}))})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,r.jsx)(ex.Z,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,r.jsx)(ep.Z,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,r.jsx)(sh.Z,{onChange:e=>v.setFieldValue("allowed_vector_store_ids",e),value:v.getFieldValue("allowed_vector_store_ids"),accessToken:a||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,r.jsxs)(sn.Z,{className:"mt-8 mb-8",children:[(0,r.jsx)(so.Z,{children:(0,r.jsx)("b",{children:"MCP Settings"})}),(0,r.jsxs)(si.Z,{children:[(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,r.jsx)(ex.Z,{title:"Select which MCP servers or access groups this team can access",children:(0,r.jsx)(ep.Z,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,r.jsx)(sy.Z,{onChange:e=>v.setFieldValue("allowed_mcp_servers_and_groups",e),value:v.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:a||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,r.jsx)(K.Z.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,r.jsx)(e7.default,{type:"hidden"})}),(0,r.jsx)(K.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_mcp_servers_and_groups!==s.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>{var e;return(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsx)(sb.Z,{accessToken:a||"",selectedServers:(null===(e=v.getFieldValue("allowed_mcp_servers_and_groups"))||void 0===e?void 0:e.servers)||[],toolPermissions:v.getFieldValue("mcp_tool_permissions")||{},onChange:e=>v.setFieldsValue({mcp_tool_permissions:e})})})}})]})]}),(0,r.jsxs)(sn.Z,{className:"mt-8 mb-8",children:[(0,r.jsx)(so.Z,{children:(0,r.jsx)("b",{children:"Logging Settings"})}),(0,r.jsx)(si.Z,{children:(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(sp.Z,{value:ek,onChange:eS,premiumUser:d})})})]}),(0,r.jsxs)(sn.Z,{className:"mt-8 mb-8",children:[(0,r.jsx)(so.Z,{children:(0,r.jsx)("b",{children:"Model Aliases"})}),(0,r.jsx)(si.Z,{children:(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)(U.Z,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,r.jsx)(sv.Z,{accessToken:a||"",initialModelAliases:eI,onAliasUpdate:eL,showExampleConfig:!1})]})})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(se.ZP,{htmlType:"submit",children:"Create Team"})})]})})]})})})},sk=t(16593),sS=t(12322),sC=t(58927);let sT=(e,s,t,l)=>[{accessorKey:"search_tool_id",header:"Search Tool ID",cell:s=>{var t;let{row:l}=s;return(0,r.jsxs)("button",{onClick:()=>e(l.original.search_tool_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",children:[null===(t=l.original.search_tool_id)||void 0===t?void 0:t.slice(0,7),"..."]})}},{accessorKey:"search_tool_name",header:"Name",cell:e=>{let{getValue:s}=e;return(0,r.jsx)("span",{className:"font-medium",children:s()})}},{id:"provider",header:"Provider",cell:e=>{let{row:s}=e,t=s.original.litellm_params.search_provider,a=l.find(e=>e.provider_name===t),n=(null==a?void 0:a.ui_friendly_name)||t;return(0,r.jsx)("span",{className:"text-sm",children:n})}},{header:"Created At",accessorKey:"created_at",sortingFn:"datetime",cell:e=>{let{row:s}=e,t=s.original;return(0,r.jsx)("span",{className:"text-xs",children:t.created_at?new Date(t.created_at).toLocaleDateString():"-"})}},{header:"Updated At",accessorKey:"updated_at",sortingFn:"datetime",cell:e=>{let{row:s}=e,t=s.original;return(0,r.jsx)("span",{className:"text-xs",children:t.updated_at?new Date(t.updated_at).toLocaleDateString():"-"})}},{id:"actions",header:"Actions",cell:e=>{let{row:l}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(sC.J,{icon:et.Z,size:"sm",onClick:()=>s(l.original.search_tool_id),className:"cursor-pointer"}),(0,r.jsx)(sC.J,{icon:er.Z,size:"sm",onClick:()=>t(l.original.search_tool_id),className:"cursor-pointer"})]})}}];var sz=t(10900),sP=t(30401),sA=t(78867),sD=t(42264),sI=t(87908),sL=t(61935);let{Text:sE}=e5.default,sF=e=>{var s,t,a,n;let{searchToolName:i,accessToken:o,className:c=""}=e,[d,m]=(0,l.useState)(""),[u,x]=(0,l.useState)(!1),[h,p]=(0,l.useState)([]),[g,f]=(0,l.useState)({}),[j,y]=(0,l.useState)(!1),b=async()=>{if(!d.trim()){sD.ZP.warning("Please enter a search query");return}x(!0);let e=performance.now();try{let s=await (0,S.searchToolQueryCall)(o,i,d),t=performance.now(),r={query:d,response:s,timestamp:Date.now(),latency:Math.round(t-e)};p(e=>[r,...e])}catch(e){console.error("Error querying search tool:",e),W.Z.fromBackend("Failed to query search tool")}finally{x(!1)}},v=e=>new Date(e).toLocaleString(),_=(e,s)=>{let t="".concat(e,"-").concat(s);f(e=>({...e,[t]:!e[t]}))},Z=(0,r.jsx)(sL.Z,{style:{fontSize:24},spin:!0}),w=h.length>0?h[0]:null;return(0,r.jsxs)(sd.Z,{className:"mt-6",children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(V.Z,{children:"Test Search Tool"})}),(0,r.jsxs)("div",{className:"flex flex-col",style:{minHeight:"600px"},children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsxs)("div",{className:"flex items-stretch gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center flex-1 bg-white rounded-lg px-4 transition-all duration-200",style:{border:j?"2px solid #3b82f6":"2px solid #e5e7eb",boxShadow:j?"0 0 0 3px rgba(59, 130, 246, 0.1)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",height:"48px"},children:[(0,r.jsx)(eV.Z,{className:"text-gray-400 mr-3",style:{fontSize:"18px"}}),(0,r.jsx)(e7.default,{value:d,onChange:e=>m(e.target.value),onFocus:()=>y(!0),onBlur:()=>y(!1),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),b())},placeholder:"Enter your search query...",disabled:u,bordered:!1,style:{fontSize:"15px",padding:0,height:"100%",boxShadow:"none"}})]}),(0,r.jsx)(se.ZP,{type:"primary",onClick:b,disabled:u||!d.trim(),icon:(0,r.jsx)(eV.Z,{}),loading:u,style:{height:"48px",paddingLeft:"24px",paddingRight:"24px",borderRadius:"8px",fontWeight:500,fontSize:"15px",backgroundColor:u||!d.trim()?void 0:"#1890ff",borderColor:u||!d.trim()?void 0:"#1890ff",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:"Search"})]})}),(0,r.jsx)("div",{className:"flex-1",children:w||u?(0,r.jsxs)("div",{children:[u&&(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center py-16",children:[(0,r.jsx)(sI.Z,{indicator:Z}),(0,r.jsx)(sE,{className:"mt-4 text-gray-600 font-medium",children:"Searching..."})]}),w&&!u&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)(sE,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Search Query"}),(0,r.jsx)("div",{className:"text-base font-semibold text-gray-900 mt-1.5",children:w.query})]}),(0,r.jsxs)("div",{className:"text-right ml-4",children:[(0,r.jsx)(sE,{className:"text-xs text-gray-500",children:v(w.timestamp)}),(0,r.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,r.jsxs)("div",{className:"text-sm font-semibold text-blue-600",children:[(null===(t=w.response)||void 0===t?void 0:null===(s=t.results)||void 0===s?void 0:s.length)||0," ",(null===(n=w.response)||void 0===n?void 0:null===(a=n.results)||void 0===a?void 0:a.length)===1?"result":"results"]}),void 0!==w.latency&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-gray-400",children:"•"}),(0,r.jsxs)("div",{className:"text-sm font-semibold text-green-600",children:[w.latency,"ms"]})]})]})]})]})}),w.response&&w.response.results&&w.response.results.length>0?(0,r.jsx)("div",{className:"space-y-3",children:w.response.results.map((e,s)=>{let t=g["0-".concat(s)]||!1;return(0,r.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",e.currentTarget.style.borderColor="#e0e7ff"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)",e.currentTarget.style.borderColor="#e5e7eb"},children:(0,r.jsxs)("div",{className:"p-5",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,r.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-600 hover:text-blue-700 flex-1 leading-snug",style:{textDecoration:"none"},onMouseEnter:e=>e.currentTarget.style.textDecoration="underline",onMouseLeave:e=>e.currentTarget.style.textDecoration="none",children:e.title}),(0,r.jsx)(se.ZP,{type:"text",size:"small",className:"flex-shrink-0",icon:(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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),onClick:()=>window.open(e.url,"_blank"),style:{color:"#6b7280"}})]}),(0,r.jsx)("div",{className:"text-sm text-green-700 mb-3 truncate font-medium",children:e.url}),(0,r.jsx)("div",{className:"text-sm text-gray-700 leading-relaxed",children:t?e.snippet:"".concat(e.snippet.substring(0,200)).concat(e.snippet.length>200?"...":"")}),e.snippet.length>200&&(0,r.jsx)(se.ZP,{type:"link",size:"small",className:"mt-3 p-0 h-auto",onClick:()=>_(0,s),style:{fontSize:"13px",fontWeight:500,color:"#3b82f6"},children:t?"Show less":"Show more"})]})},s)})}):(0,r.jsxs)("div",{className:"text-center py-12 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 mx-auto mb-4",children:(0,r.jsx)(eV.Z,{style:{fontSize:"24px",color:"#9ca3af"}})}),(0,r.jsx)(sE,{className:"text-gray-600 font-medium",children:"No results found"}),(0,r.jsx)(sE,{className:"text-sm text-gray-500 mt-1",children:"Try a different search query"})]})]}),h.length>1&&(0,r.jsxs)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)(sE,{className:"text-sm font-semibold text-gray-700",children:"Previous Searches"}),(0,r.jsx)(se.ZP,{onClick:()=>{p([]),f({}),W.Z.success("Search history cleared")},size:"small",type:"link",style:{fontSize:"13px",fontWeight:500},children:"Clear All"})]}),(0,r.jsx)("div",{className:"space-y-2",children:h.slice(1,6).map((e,s)=>{var t,l,a,n;return(0,r.jsxs)("div",{className:"p-3 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:border-gray-300",onClick:()=>{m(e.query)},children:[(0,r.jsx)("div",{className:"text-sm font-medium text-gray-800 truncate",children:e.query}),(0,r.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"font-medium text-blue-600",children:[(null===(l=e.response)||void 0===l?void 0:null===(t=l.results)||void 0===t?void 0:t.length)||0," ",(null===(n=e.response)||void 0===n?void 0:null===(a=n.results)||void 0===a?void 0:a.length)===1?"result":"results"]}),void 0!==e.latency&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:"•"}),(0,r.jsxs)("span",{className:"font-medium text-green-600",children:[e.latency,"ms"]})]}),(0,r.jsx)("span",{children:"•"}),(0,r.jsx)("span",{children:v(e.timestamp)})]})]},s+1)})})]})]}):(0,r.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-24 h-24 rounded-full bg-gray-100 mb-6",children:(0,r.jsx)(eV.Z,{style:{fontSize:"48px",color:"#9ca3af"}})}),(0,r.jsx)(sE,{className:"text-lg text-gray-600 font-medium",children:"Test your search tool"}),(0,r.jsx)(sE,{className:"text-sm text-gray-500 mt-2",children:"Enter a query above to see search results"})]})})]})]})},sR=e=>{var s;let{searchTool:t,onBack:a,isEditing:n,accessToken:i,availableProviders:o}=e,[c,d]=(0,l.useState)({}),m=async(e,s)=>{await (0,sg.vQ)(e)&&(d(e=>({...e,[s]:!0})),setTimeout(()=>{d(e=>({...e,[s]:!1}))},2e3))};return(0,r.jsxs)("div",{className:"p-4 max-w-full",children:[(0,r.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(F.Z,{icon:sz.Z,variant:"light",className:"mb-4",onClick:a,children:"Back to All Search Tools"}),(0,r.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,r.jsx)(V.Z,{children:t.search_tool_name}),(0,r.jsx)(se.ZP,{type:"text",size:"small",icon:c["search-tool-name"]?(0,r.jsx)(sP.Z,{size:12}):(0,r.jsx)(sA.Z,{size:12}),onClick:()=>m(t.search_tool_name,"search-tool-name"),className:"left-2 z-10 transition-all duration-200 ".concat(c["search-tool-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]}),(0,r.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,r.jsx)(U.Z,{className:"text-gray-500 font-mono",children:t.search_tool_id}),(0,r.jsx)(se.ZP,{type:"text",size:"small",icon:c["search-tool-id"]?(0,r.jsx)(sP.Z,{size:12}):(0,r.jsx)(sA.Z,{size:12}),onClick:()=>m(t.search_tool_id,"search-tool-id"),className:"left-2 z-10 transition-all duration-200 ".concat(c["search-tool-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]})}),(0,r.jsxs)(su.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,r.jsxs)(sd.Z,{children:[(0,r.jsx)(U.Z,{children:"Provider"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(V.Z,{children:(e=>{let s=o.find(s=>s.provider_name===e);return(null==s?void 0:s.ui_friendly_name)||e})(t.litellm_params.search_provider)})})]}),(0,r.jsxs)(sd.Z,{children:[(0,r.jsx)(U.Z,{children:"API Key"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(U.Z,{children:t.litellm_params.api_key?"****":"Not set"})})]}),(0,r.jsxs)(sd.Z,{children:[(0,r.jsx)(U.Z,{children:"Created At"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(U.Z,{children:t.created_at?new Date(t.created_at).toLocaleString():"Unknown"})})]})]}),(null===(s=t.search_tool_info)||void 0===s?void 0:s.description)&&(0,r.jsxs)(sd.Z,{className:"mt-6",children:[(0,r.jsx)(U.Z,{children:"Description"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(U.Z,{children:t.search_tool_info.description})})]}),(0,r.jsx)("div",{className:"mt-6",children:i&&(0,r.jsx)(sF,{searchToolName:t.search_tool_name,accessToken:i})})]})};var sM=t(29),sO=t.n(sM),sB=t(23496),sq=t(35291);let{Text:sU}=e5.default;var sV=e=>{let{litellmParams:s,accessToken:t,onTestComplete:a}=e,[n,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,m]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{i(!0);try{let e=await (0,S.testSearchToolConnection)(t,s);c(e),"success"===e.status&&W.Z.success("Connection test successful!")}catch(e){c({status:"error",message:e instanceof Error?e.message:"Unknown error occurred",error_type:"NetworkError"})}finally{i(!1),a&&a()}})()},[t,s,a]);let u=(null==o?void 0:o.message)?(e=>{if(!e)return"Unknown error";let s=e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error:\s*/,"").replace(/^AuthenticationError:\s*/,"");if(s.includes("")||s.includes("(.*?)<\/title>/);return e?e[1]:s.includes("401")||s.includes("Authorization Required")?"Authentication failed: Invalid API key or credentials":"Authentication error - please check your API key"}return s.length>200?s.substring(0,200)+"...":s})(o.message):"Unknown error";return n?(0,r.jsx)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:(0,r.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,r.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b 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-dc9a0e2d897fe63b"})}),(0,r.jsxs)(sU,{style:{fontSize:"16px"},children:["Testing connection to ",s.search_provider||"search provider","..."]}),(0,r.jsx)(sO(),{id:"dc9a0e2d897fe63b",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)}}"})]})}):o?(0,r.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:["success"===o.status?(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,r.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},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)("div",{style:{marginLeft:"12px"},children:[(0,r.jsxs)(sU,{type:"success",style:{fontSize:"18px",fontWeight:500,display:"block"},children:["Connection to ",s.search_provider," successful!"]}),o.test_query&&(0,r.jsxs)(sU,{style:{fontSize:"14px",color:"#666",marginTop:"8px",display:"block"},children:["Test query: ",(0,r.jsx)("code",{style:{backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"4px"},children:o.test_query})]}),void 0!==o.results_count&&(0,r.jsxs)(sU,{style:{fontSize:"14px",color:"#666",display:"block"},children:["Results retrieved: ",o.results_count]})]})]}):(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)(sq.Z,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,r.jsxs)(sU,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",s.search_provider||"search provider"," 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.jsxs)(sU,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,r.jsx)(sU,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:u}),o.error_type&&(0,r.jsx)("div",{style:{marginTop:"8px"},children:(0,r.jsxs)(sU,{style:{fontSize:"13px",color:"#666"},children:["Error type:"," ",(0,r.jsx)("code",{style:{backgroundColor:"#ffebee",padding:"2px 6px",borderRadius:"4px",color:"#d32f2f"},children:o.error_type})]})}),o.message&&(0,r.jsx)("div",{style:{marginTop:"12px"},children:(0,r.jsx)(se.ZP,{type:"link",onClick:()=>m(!d),style:{paddingLeft:0,height:"auto"},children:d?"Hide Details":"Show Details"})})]}),d&&(0,r.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,r.jsx)(sU,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Full Error 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",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:o.message})]}),(0,r.jsxs)("div",{style:{backgroundColor:"#fffbf0",border:"1px solid #ffe58f",borderLeft:"4px solid #faad14",borderRadius:"8px",padding:"16px"},children:[(0,r.jsx)(sU,{strong:!0,style:{display:"block",marginBottom:"8px",color:"#d48806"},children:"Troubleshooting tips:"}),(0,r.jsxs)("ul",{style:{margin:"8px 0",paddingLeft:"20px",color:"#ad6800"},children:[(0,r.jsx)("li",{style:{marginBottom:"6px"},children:"Verify your API key is correct and active"}),(0,r.jsx)("li",{style:{marginBottom:"6px"},children:"Check if the search provider service is operational"}),(0,r.jsx)("li",{style:{marginBottom:"6px"},children:"Ensure you have sufficient credits/quota with the provider"}),(0,r.jsx)("li",{style:{marginBottom:"6px"},children:"Review the provider's documentation for any additional requirements"})]})]})]})}),(0,r.jsx)(sB.Z,{style:{margin:"24px 0 16px"}}),(0,r.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,r.jsx)(se.ZP,{type:"link",href:"https://docs.litellm.ai/docs/search",target:"_blank",icon:(0,r.jsx)(ep.Z,{}),children:"View Search Documentation"})})]}):null};let{TextArea:sK}=e7.default,sH=e=>"".concat("/ui/assets/logos/").concat(e,".png"),sW=e=>{let{providerName:s,displayName:t}=e;return(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(eg.default,{src:sH(s),alt:"",width:20,height:20,style:{marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,r.jsx)("span",{children:t})]})};var sY=e=>{let{userRole:s,accessToken:t,onCreateSuccess:a,isModalVisible:n,setModalVisible:i}=e,[o]=K.Z.useForm(),[c,d]=(0,l.useState)(!1),[m,u]=(0,l.useState)({}),[x,h]=(0,l.useState)(!1),[p,g]=(0,l.useState)(!1),[f,j]=(0,l.useState)(""),{data:y,isLoading:b}=(0,sk.a)({queryKey:["searchProviders"],queryFn:()=>{if(!t)throw Error("Access Token required");return(0,S.fetchAvailableSearchProviders)(t)},enabled:!!t&&n}),v=(null==y?void 0:y.providers)||[],_=async e=>{d(!0);try{let s={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};if(console.log("Creating search tool with payload:",s),null!=t){let e=await (0,S.createSearchTool)(t,s);W.Z.success("Search tool created successfully"),o.resetFields(),u({}),i(!1),a(e)}}catch(e){W.Z.error("Error creating search tool: "+e)}finally{d(!1)}},Z=async()=>{try{await o.validateFields(["search_provider","api_key"]),g(!0),j("test-".concat(Date.now())),h(!0)}catch(e){W.Z.error("Please fill in Search Provider and API Key before testing")}};return(l.useEffect(()=>{n||u({})},[n]),(0,eX.tY)(s))?(0,r.jsxs)(H.Z,{title:(0,r.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,r.jsx)("span",{className:"text-2xl",children:"\uD83D\uDD0D"}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Search Tool"})]}),open:n,width:800,onCancel:()=>{o.resetFields(),u({}),i(!1)},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:[(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsxs)(K.Z,{form:o,onFinish:_,onValuesChange:(e,s)=>u(s),layout:"vertical",className:"space-y-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Tool Name",(0,r.jsx)(ex.Z,{title:"A unique name to identify this search tool configuration (e.g., 'perplexity-search', 'tavily-news-search').",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_tool_name",rules:[{required:!0,message:"Please enter a search tool name"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Name can only contain letters, numbers, hyphens, and underscores"}],children:(0,r.jsx)(eu.o,{placeholder:"e.g., perplexity-search, my-tavily-tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Provider",(0,r.jsx)(ex.Z,{title:"Select the search provider you want to use. Each provider has different capabilities and pricing.",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,r.jsx)(eh.default,{placeholder:"Select a search provider",className:"rounded-lg",size:"large",loading:b,showSearch:!0,optionFilterProp:"children",optionLabelProp:"label",children:v.map(e=>(0,r.jsx)(eh.default.Option,{value:e.provider_name,label:(0,r.jsx)(sW,{providerName:e.provider_name,displayName:e.ui_friendly_name}),children:(0,r.jsx)(sW,{providerName:e.provider_name,displayName:e.ui_friendly_name})},e.provider_name))})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["API Key",(0,r.jsx)(ex.Z,{title:"The API key for authenticating with the search provider. This will be securely stored.",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"api_key",rules:[{required:!1,message:"Please enter an API key"}],children:(0,r.jsx)(eu.o,{type:"password",placeholder:"Enter your API key",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description (Optional)"}),name:"description",children:(0,r.jsx)(sK,{rows:3,placeholder:"Brief description of this search tool's purpose",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,r.jsxs)("div",{className:"flex justify-between items-center pt-6 border-t border-gray-100",children:[(0,r.jsx)(ex.Z,{title:"Get help on our github",children:(0,r.jsx)(e5.default.Link,{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",children:"Need Help?"})}),(0,r.jsxs)("div",{className:"space-x-2",children:[(0,r.jsx)(eu.z,{onClick:Z,loading:p,children:"Test Connection"}),(0,r.jsx)(eu.z,{loading:c,type:"submit",children:"Add Search Tool"})]})]})]})}),(0,r.jsx)(H.Z,{title:"Connection Test Results",open:x,onCancel:()=>{h(!1),g(!1)},footer:[(0,r.jsx)(eu.z,{onClick:()=>{h(!1),g(!1)},children:"Close"},"close")],width:700,children:x&&t&&(0,r.jsx)(sV,{litellmParams:{search_provider:m.search_provider,api_key:m.api_key,api_base:m.api_base},accessToken:t,onTestComplete:()=>g(!1)},f)})]}):null};let sJ=e=>{let{isModalOpen:s,title:t,confirmDelete:l,cancelDelete:a}=e;return s?(0,r.jsx)(H.Z,{open:s,onOk:l,okType:"danger",onCancel:a,children:(0,r.jsxs)(su.Z,{numItems:1,className:"gap-2 w-full",children:[(0,r.jsx)(V.Z,{children:t}),(0,r.jsx)(sm.Z,{numColSpan:1,children:(0,r.jsx)("p",{children:"Are you sure you want to delete this search tool?"})})]})}):null};var sG=e=>{let{accessToken:s,userRole:t,userID:a}=e,{data:n,isLoading:i,refetch:o}=(0,sk.a)({queryKey:["searchTools"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,S.fetchSearchTools)(s).then(e=>e.search_tools||[])},enabled:!!s}),{data:c,isLoading:d}=(0,sk.a)({queryKey:["searchProviders"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,S.fetchAvailableSearchProviders)(s)},enabled:!!s}),m=(null==c?void 0:c.providers)||[],[u,x]=(0,l.useState)(null),[h,p]=(0,l.useState)(!1),[g,f]=(0,l.useState)(null),[j,y]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[_,Z]=(0,l.useState)(!1),[w]=K.Z.useForm(),N=l.useMemo(()=>sT(e=>{f(e),y(!1)},e=>{let s=null==n?void 0:n.find(s=>s.search_tool_id===e);if(s){var t;w.setFieldsValue({search_tool_name:s.search_tool_name,search_provider:s.litellm_params.search_provider,api_key:s.litellm_params.api_key,api_base:s.litellm_params.api_base,timeout:s.litellm_params.timeout,max_retries:s.litellm_params.max_retries,description:null===(t=s.search_tool_info)||void 0===t?void 0:t.description}),f(e),Z(!0)}},k,m),[m,n,w]);function k(e){x(e),p(!0)}let C=async()=>{if(null!=u&&null!=s){try{await (0,S.deleteSearchTool)(s,u),W.Z.success("Deleted search tool successfully"),o()}catch(e){console.error("Error deleting the search tool:",e),W.Z.error("Failed to delete search tool")}p(!1),x(null)}},T=async()=>{if(s&&g)try{let e=await w.validateFields(),t={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};await (0,S.updateSearchTool)(s,g,t),W.Z.success("Search tool updated successfully"),Z(!1),w.resetFields(),f(null),o()}catch(e){console.error("Failed to update search tool:",e),W.Z.error("Failed to update search tool")}};return s&&t&&a?(0,r.jsxs)("div",{className:"w-full h-full p-6",children:[(0,r.jsx)(sJ,{isModalOpen:h,title:"Delete Search Tool",confirmDelete:C,cancelDelete:()=>{p(!1),x(null)}}),(0,r.jsx)(sY,{userRole:t,accessToken:s,onCreateSuccess:e=>{v(!1),o()},isModalVisible:b,setModalVisible:v}),(0,r.jsx)(H.Z,{title:"Edit Search Tool",open:_,onOk:T,onCancel:()=>{Z(!1),w.resetFields(),f(null)},width:600,children:(0,r.jsxs)(K.Z,{form:w,layout:"vertical",children:[(0,r.jsx)(K.Z.Item,{name:"search_tool_name",label:"Search Tool Name",rules:[{required:!0,message:"Please enter a search tool name"}],children:(0,r.jsx)(e7.default,{placeholder:"e.g., my-perplexity-search"})}),(0,r.jsx)(K.Z.Item,{name:"search_provider",label:"Search Provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,r.jsx)(eh.default,{placeholder:"Select a search provider",loading:d,children:m.map(e=>(0,r.jsx)(eh.default.Option,{value:e.provider_name,children:e.ui_friendly_name},e.provider_name))})}),(0,r.jsx)(K.Z.Item,{name:"api_key",label:"API Key",extra:"API key for the search provider",children:(0,r.jsx)(e7.default.Password,{placeholder:"Enter API key"})}),(0,r.jsx)(K.Z.Item,{name:"description",label:"Description",children:(0,r.jsx)(e7.default.TextArea,{rows:3,placeholder:"Description of this search tool"})})]})}),(0,r.jsx)(V.Z,{children:"Search Tools"}),(0,r.jsx)(U.Z,{className:"text-tremor-content mt-2",children:"Configure and manage your search providers"}),(0,eX.tY)(t)&&(0,r.jsx)(F.Z,{className:"mt-4 mb-4",onClick:()=>v(!0),children:"+ Add New Search Tool"}),(0,r.jsx)(()=>g?(0,r.jsx)(sR,{searchTool:(null==n?void 0:n.find(e=>e.search_tool_id===g))||{search_tool_id:"",search_tool_name:"",litellm_params:{search_provider:""}},onBack:()=>{y(!1),f(null),o()},isEditing:j,accessToken:s,availableProviders:m}):(0,r.jsx)("div",{className:"w-full h-full",children:(0,r.jsx)("div",{className:"w-full px-6 mt-6",children:(0,r.jsx)(sS.w,{data:n||[],columns:N,renderSubComponent:()=>(0,r.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:i,noDataMessage:"No search tools configured"})})}),{})]}):(console.log("Missing required authentication parameters",{accessToken:s,userRole:t,userID:a}),(0,r.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))};function sX(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";document.cookie="".concat(e,"=; Max-Age=0; Path=").concat(s)}function s$(e){try{let s=(0,n.o)(e);if(s&&"number"==typeof s.exp)return 1e3*s.exp<=Date.now();return!1}catch(e){return!0}}let sQ=new i.S;function s0(){return(0,r.jsxs)("div",{className:(0,eC.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,r.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"\uD83D\uDE85 LiteLLM"}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)(eS.S,{className:"size-4"}),(0,r.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}function s1(){let[e,s]=(0,l.useState)(""),[t,i]=(0,l.useState)(!1),[F,R]=(0,l.useState)(!1),[M,O]=(0,l.useState)(null),[B,q]=(0,l.useState)(null),[U,V]=(0,l.useState)([]),[K,H]=(0,l.useState)([]),[W,Y]=(0,l.useState)([]),[J,G]=(0,l.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[X,$]=(0,l.useState)(!0),Q=(0,a.useSearchParams)(),[ee,es]=(0,l.useState)({data:[]}),[et,er]=(0,l.useState)(null),[el,ea]=(0,l.useState)(!1),[en,ei]=(0,l.useState)(!0),[eo,ec]=(0,l.useState)(null),{refactoredUIFlag:ed}=(0,eT.Z)(),em=Q.get("invitation_id"),[eu,ex]=(0,l.useState)(()=>Q.get("page")||"api-keys"),[eh,ep]=(0,l.useState)(null),[eg,ef]=(0,l.useState)(!1),ej=e=>{V(s=>s?[...s,e]:[e]),ea(()=>!el)},ey=!1===en&&null===et&&null===em;return((0,l.useEffect)(()=>{let e=!1;return(async()=>{try{await (0,S.getUiConfig)()}catch(e){}if(e)return;let s=function(e){let s=document.cookie.split("; ").find(s=>s.startsWith(e+"="));if(!s)return null;let t=s.slice(e.length+1);try{return decodeURIComponent(t)}catch(e){return t}}("token"),t=s&&!s$(s)?s:null;s&&!t&&sX("token","/"),e||(er(t),ei(!1))})(),()=>{e=!0}},[]),(0,l.useEffect)(()=>{if(ey){let e=(S.proxyBaseUrl||"")+"/sso/key/generate";window.location.replace(e)}},[ey]),(0,l.useEffect)(()=>{if(!et)return;if(s$(et)){sX("token","/"),er(null);return}let e=null;try{e=(0,n.o)(et)}catch(e){sX("token","/"),er(null);return}if(e){if(ep(e.key),R(e.disabled_non_admin_personal_key_creation),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(e.user_role);s(t),"Admin Viewer"==t&&ex("usage")}e.user_email&&O(e.user_email),e.login_method&&$("username_password"==e.login_method),e.premium_user&&i(e.premium_user),e.auth_header_name&&(0,S.setGlobalLitellmHeaderName)(e.auth_header_name),e.user_id&&ec(e.user_id)}},[et]),(0,l.useEffect)(()=>{eh&&eo&&e&&(0,P.Nr)(eo,e,eh,Y),eh&&eo&&e&&(0,A.Z)(eh,eo,e,null,q),eh&&(0,h.g)(eh,H)},[eh,eo,e]),en||ey)?(0,r.jsx)(s0,{}):(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(s0,{}),children:(0,r.jsx)(o.aH,{client:sQ,children:(0,r.jsx)(d.f,{accessToken:eh,children:em?(0,r.jsx)(m.Z,{userID:eo,userRole:e,premiumUser:t,teams:B,keys:U,setUserRole:s,userEmail:M,setUserEmail:O,setTeams:q,setKeys:V,organizations:K,addKey:ej,createClicked:el}):(0,r.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,r.jsx)(c.Z,{userID:eo,userRole:e,premiumUser:t,userEmail:M,setProxySettings:G,proxySettings:J,accessToken:eh,isPublicPage:!1,sidebarCollapsed:eg,onToggleSidebar:()=>{ef(!eg)}}),(0,r.jsxs)("div",{className:"flex flex-1 overflow-auto",children:[(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(e6,{setPage:e=>{let s=new URLSearchParams(Q);s.set("page",e),window.history.pushState(null,"","?".concat(s.toString())),ex(e)},defaultSelectedKey:eu,sidebarCollapsed:eg})}),"api-keys"==eu?(0,r.jsx)(m.Z,{userID:eo,userRole:e,premiumUser:t,teams:B,keys:U,setUserRole:s,userEmail:M,setUserEmail:O,setTeams:q,setKeys:V,organizations:K,addKey:ej,createClicked:el}):"models"==eu?(0,r.jsx)(u.Z,{userID:eo,userRole:e,token:et,keys:U,accessToken:eh,modelData:ee,setModelData:es,premiumUser:t,teams:B}):"llm-playground"==eu?(0,r.jsx)(w.Z,{userID:eo,userRole:e,token:et,accessToken:eh,disabledPersonalKeyCreation:F}):"users"==eu?(0,r.jsx)(x.Z,{userID:eo,userRole:e,token:et,keys:U,teams:B,accessToken:eh,setKeys:V}):"teams"==eu?(0,r.jsx)(sN,{teams:B,setTeams:q,accessToken:eh,userID:eo,userRole:e,organizations:K,premiumUser:t,searchParams:Q}):"organizations"==eu?(0,r.jsx)(h.Z,{organizations:K,setOrganizations:H,userModels:W,accessToken:eh,userRole:e,premiumUser:t}):"admin-panel"==eu?(0,r.jsx)(p.Z,{setTeams:q,searchParams:Q,accessToken:eh,userID:eo,showSSOBanner:X,premiumUser:t,proxySettings:J}):"api_ref"==eu?(0,r.jsx)(Z.Z,{proxySettings:J}):"settings"==eu?(0,r.jsx)(g.Z,{userID:eo,userRole:e,accessToken:eh,premiumUser:t}):"budgets"==eu?(0,r.jsx)(y.Z,{accessToken:eh}):"guardrails"==eu?(0,r.jsx)(C.Z,{accessToken:eh,userRole:e}):"prompts"==eu?(0,r.jsx)(T.Z,{accessToken:eh,userRole:e}):"transform-request"==eu?(0,r.jsx)(z.Z,{accessToken:eh}):"general-settings"==eu?(0,r.jsx)(f.Z,{userID:eo,userRole:e,accessToken:eh,modelData:ee}):"ui-theme"==eu?(0,r.jsx)(E.Z,{userID:eo,userRole:e,accessToken:eh}):"cost-tracking-settings"==eu?(0,r.jsx)(ek,{userID:eo,userRole:e,accessToken:eh}):"model-hub-table"==eu?(0,r.jsx)(v.Z,{accessToken:eh,publicPage:!1,premiumUser:t,userRole:e}):"caching"==eu?(0,r.jsx)(k.Z,{userID:eo,userRole:e,token:et,accessToken:eh,premiumUser:t}):"pass-through-settings"==eu?(0,r.jsx)(j.Z,{userID:eo,userRole:e,accessToken:eh,modelData:ee,premiumUser:t}):"logs"==eu?(0,r.jsx)(b.Z,{userID:eo,userRole:e,token:et,accessToken:eh,allTeams:null!=B?B:[],premiumUser:t}):"mcp-servers"==eu?(0,r.jsx)(D.d,{accessToken:eh,userRole:e,userID:eo}):"search-tools"==eu?(0,r.jsx)(sG,{accessToken:eh,userRole:e,userID:eo}):"tag-management"==eu?(0,r.jsx)(I.Z,{accessToken:eh,userRole:e,userID:eo}):"vector-stores"==eu?(0,r.jsx)(L.Z,{accessToken:eh,userRole:e,userID:eo}):"new_usage"==eu?(0,r.jsx)(_.Z,{userID:eo,userRole:e,accessToken:eh,teams:null!=B?B:[],premiumUser:t}):(0,r.jsx)(N.Z,{userID:eo,userRole:e,token:et,accessToken:eh,keys:U,premiumUser:t})]})]})})})})}},88904:function(e,s,t){"use strict";var r=t(57437),l=t(2265),a=t(88913),n=t(93192),i=t(52787),o=t(63709),c=t(87908),d=t(19250),m=t(65925),u=t(46468),x=t(9114);s.Z=e=>{var s;let{accessToken:t,userID:h,userRole:p}=e,[g,f]=(0,l.useState)(!0),[j,y]=(0,l.useState)(null),[b,v]=(0,l.useState)(!1),[_,Z]=(0,l.useState)({}),[w,N]=(0,l.useState)(!1),[k,S]=(0,l.useState)([]),{Paragraph:C}=n.default,{Option:T}=i.default;(0,l.useEffect)(()=>{(async()=>{if(!t){f(!1);return}try{let e=await (0,d.getDefaultTeamSettings)(t);if(y(e),Z(e.values||{}),t)try{let e=await (0,d.modelAvailableCall)(t,h,p);if(e&&e.data){let s=e.data.map(e=>e.id);S(s)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching team SSO settings:",e),x.Z.fromBackend("Failed to fetch team settings")}finally{f(!1)}})()},[t]);let z=async()=>{if(t){N(!0);try{let e=await (0,d.updateDefaultTeamSettings)(t,_);y({...j,values:e.settings}),v(!1),x.Z.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),x.Z.fromBackend("Failed to update team settings")}finally{N(!1)}}},P=(e,s)=>{Z(t=>({...t,[e]:s}))},A=(e,s,t)=>{var l;let n=s.type;return"budget_duration"===e?(0,r.jsx)(m.Z,{value:_[e]||null,onChange:s=>P(e,s),className:"mt-2"}):"boolean"===n?(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(o.Z,{checked:!!_[e],onChange:s=>P(e,s)})}):"array"===n&&(null===(l=s.items)||void 0===l?void 0:l.enum)?(0,r.jsx)(i.default,{mode:"multiple",style:{width:"100%"},value:_[e]||[],onChange:s=>P(e,s),className:"mt-2",children:s.items.enum.map(e=>(0,r.jsx)(T,{value:e,children:e},e))}):"models"===e?(0,r.jsx)(i.default,{mode:"multiple",style:{width:"100%"},value:_[e]||[],onChange:s=>P(e,s),className:"mt-2",children:k.map(e=>(0,r.jsx)(T,{value:e,children:(0,u.W0)(e)},e))}):"string"===n&&s.enum?(0,r.jsx)(i.default,{style:{width:"100%"},value:_[e]||"",onChange:s=>P(e,s),className:"mt-2",children:s.enum.map(e=>(0,r.jsx)(T,{value:e,children:e},e))}):(0,r.jsx)(a.oi,{value:void 0!==_[e]?String(_[e]):"",onChange:s=>P(e,s.target.value),placeholder:s.description||"",className:"mt-2"})},D=(e,s)=>null==s?(0,r.jsx)("span",{className:"text-gray-400",children:"Not set"}):"budget_duration"===e?(0,r.jsx)("span",{children:(0,m.m)(s)}):"boolean"==typeof s?(0,r.jsx)("span",{children:s?"Enabled":"Disabled"}):"models"===e&&Array.isArray(s)?0===s.length?(0,r.jsx)("span",{className:"text-gray-400",children:"None"}):(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,r.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,u.W0)(e)},s))}):"object"==typeof s?Array.isArray(s)?0===s.length?(0,r.jsx)("span",{className:"text-gray-400",children:"None"}):(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,r.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,r.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(s,null,2)}):(0,r.jsx)("span",{children:String(s)});return g?(0,r.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,r.jsx)(c.Z,{size:"large"})}):j?(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,r.jsx)(a.Dx,{className:"text-xl",children:"Default Team Settings"}),!g&&j&&(b?(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(a.zx,{variant:"secondary",onClick:()=>{v(!1),Z(j.values||{})},disabled:w,children:"Cancel"}),(0,r.jsx)(a.zx,{onClick:z,loading:w,children:"Save Changes"})]}):(0,r.jsx)(a.zx,{onClick:()=>v(!0),children:"Edit Settings"}))]}),(0,r.jsx)(a.xv,{children:"These settings will be applied by default when creating new teams."}),(null==j?void 0:null===(s=j.field_schema)||void 0===s?void 0:s.description)&&(0,r.jsx)(C,{className:"mb-4 mt-2",children:j.field_schema.description}),(0,r.jsx)(a.iz,{}),(0,r.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:s}=j;return s&&s.properties?Object.entries(s.properties).map(s=>{let[t,l]=s,n=e[t],i=t.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)(a.xv,{className:"font-medium text-lg",children:i}),(0,r.jsx)(C,{className:"text-sm text-gray-500 mt-1",children:l.description||"No description available"}),b?(0,r.jsx)("div",{className:"mt-2",children:A(t,l,n)}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:D(t,n)})]},t)}):(0,r.jsx)(a.xv,{children:"No schema information available"})})()})]}):(0,r.jsx)(a.Zb,{children:(0,r.jsx)(a.xv,{children:"No team settings available or you do not have permission to view them."})})}},49104:function(e,s,t){"use strict";t.d(s,{Z:function(){return E}});var r=t(57437),l=t(2265),a=t(87452),n=t(88829),i=t(72208),o=t(49566),c=t(13634),d=t(82680),m=t(20577),u=t(52787),x=t(73002),h=t(19250),p=t(9114),g=e=>{let{isModalVisible:s,accessToken:t,setIsModalVisible:l,setBudgetList:g}=e,[f]=c.Z.useForm(),j=async e=>{if(null!=t&&void 0!=t)try{p.Z.info("Making API Call");let s=await (0,h.budgetCreateCall)(t,e);console.log("key create Response:",s),g(e=>e?[...e,s]:[s]),p.Z.success("Budget Created"),f.resetFields()}catch(e){console.error("Error creating the key:",e),p.Z.fromBackend("Error creating the key: ".concat(e))}};return(0,r.jsx)(d.Z,{title:"Create Budget",visible:s,width:800,footer:null,onOk:()=>{l(!1),f.resetFields()},onCancel:()=>{l(!1),f.resetFields()},children:(0,r.jsxs)(c.Z,{form:f,onFinish:j,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.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)(o.Z,{placeholder:""})}),(0,r.jsx)(c.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)(c.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)(a.Z,{className:"mt-20 mb-8",children:[(0,r.jsx)(i.Z,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(n.Z,{children:[(0,r.jsx)(c.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(m.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(c.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(u.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(u.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(u.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(u.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(x.ZP,{htmlType:"submit",children:"Create Budget"})})]})})},f=e=>{let{isModalVisible:s,accessToken:t,setIsModalVisible:g,setBudgetList:f,existingBudget:j,handleUpdateCall:y}=e;console.log("existingBudget",j);let[b]=c.Z.useForm();(0,l.useEffect)(()=>{b.setFieldsValue(j)},[j,b]);let v=async e=>{if(null!=t&&void 0!=t)try{p.Z.info("Making API Call"),g(!0);let s=await (0,h.budgetUpdateCall)(t,e);f(e=>e?[...e,s]:[s]),p.Z.success("Budget Updated"),b.resetFields(),y()}catch(e){console.error("Error creating the key:",e),p.Z.fromBackend("Error creating the key: ".concat(e))}};return(0,r.jsx)(d.Z,{title:"Edit Budget",visible:s,width:800,footer:null,onOk:()=>{g(!1),b.resetFields()},onCancel:()=>{g(!1),b.resetFields()},children:(0,r.jsxs)(c.Z,{form:b,onFinish:v,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:j,children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.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)(o.Z,{placeholder:""})}),(0,r.jsx)(c.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)(c.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)(a.Z,{className:"mt-20 mb-8",children:[(0,r.jsx)(i.Z,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(n.Z,{children:[(0,r.jsx)(c.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(m.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(c.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(u.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(u.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(u.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(u.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(x.ZP,{htmlType:"submit",children:"Save"})})]})})},j=t(20831),y=t(12514),b=t(47323),v=t(12485),_=t(18135),Z=t(35242),w=t(29706),N=t(77991),k=t(21626),S=t(97214),C=t(28241),T=t(58834),z=t(69552),P=t(71876),A=t(84264),D=t(53410),I=t(74998),L=t(17906),E=e=>{let{accessToken:s}=e,[t,a]=(0,l.useState)(!1),[n,i]=(0,l.useState)(!1),[o,c]=(0,l.useState)(null),[d,m]=(0,l.useState)([]);(0,l.useEffect)(()=>{s&&(0,h.getBudgetList)(s).then(e=>{m(e)})},[s]);let u=async(e,t)=>{console.log("budget_id",e),null!=s&&(c(d.find(s=>s.budget_id===e)||null),i(!0))},x=async(e,t)=>{if(null==s)return;p.Z.info("Request made"),await (0,h.budgetDeleteCall)(s,e);let r=[...d];r.splice(t,1),m(r),p.Z.success("Budget Deleted.")},E=async()=>{null!=s&&(0,h.getBudgetList)(s).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)(j.Z,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>a(!0),children:"+ Create Budget"}),(0,r.jsx)(g,{accessToken:s,isModalVisible:t,setIsModalVisible:a,setBudgetList:m}),o&&(0,r.jsx)(f,{accessToken:s,isModalVisible:n,setIsModalVisible:i,setBudgetList:m,existingBudget:o,handleUpdateCall:E}),(0,r.jsxs)(y.Z,{children:[(0,r.jsx)(A.Z,{children:"Create a budget to assign to customers."}),(0,r.jsxs)(k.Z,{children:[(0,r.jsx)(T.Z,{children:(0,r.jsxs)(P.Z,{children:[(0,r.jsx)(z.Z,{children:"Budget ID"}),(0,r.jsx)(z.Z,{children:"Max Budget"}),(0,r.jsx)(z.Z,{children:"TPM"}),(0,r.jsx)(z.Z,{children:"RPM"})]})}),(0,r.jsx)(S.Z,{children:d.slice().sort((e,s)=>new Date(s.updated_at).getTime()-new Date(e.updated_at).getTime()).map((e,s)=>(0,r.jsxs)(P.Z,{children:[(0,r.jsx)(C.Z,{children:e.budget_id}),(0,r.jsx)(C.Z,{children:e.max_budget?e.max_budget:"n/a"}),(0,r.jsx)(C.Z,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,r.jsx)(C.Z,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,r.jsx)(b.Z,{icon:D.Z,size:"sm",onClick:()=>u(e.budget_id,s)}),(0,r.jsx)(b.Z,{icon:I.Z,size:"sm",onClick:()=>x(e.budget_id,s)})]},s))})]})]}),(0,r.jsxs)("div",{className:"mt-5",children:[(0,r.jsx)(A.Z,{className:"text-base",children:"How to use budget id"}),(0,r.jsxs)(_.Z,{children:[(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(v.Z,{children:"Assign Budget to Customer"}),(0,r.jsx)(v.Z,{children:"Test it (Curl)"}),(0,r.jsx)(v.Z,{children:"Test it (OpenAI SDK)"})]}),(0,r.jsxs)(N.Z,{children:[(0,r.jsx)(w.Z,{children:(0,r.jsx)(L.Z,{language:"bash",children:"\ncurl -X POST --location '/end_user/new' \n-H 'Authorization: Bearer ' \n-H 'Content-Type: application/json' \n-d '{\"user_id\": \"my-customer-id', \"budget_id\": \"\"}' # \uD83D\uDC48 KEY CHANGE\n\n "})}),(0,r.jsx)(w.Z,{children:(0,r.jsx)(L.Z,{language:"bash",children:'\ncurl -X POST --location \'/chat/completions\' \n-H \'Authorization: Bearer \' \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)(w.Z,{children:(0,r.jsx)(L.Z,{language:"python",children:'from openai import OpenAI\nclient = OpenAI(\n base_url="",\n api_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)'})})]})]})]})]})}},918:function(e,s,t){"use strict";var r=t(57437),l=t(2265),a=t(62490),n=t(19250),i=t(9114);s.Z=e=>{let{accessToken:s,userID:t}=e,[o,c]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(s&&t)try{let e=await (0,n.availableTeamListCall)(s);c(e)}catch(e){console.error("Error fetching available teams:",e)}})()},[s,t]);let d=async e=>{if(s&&t)try{await (0,n.teamMemberAddCall)(s,e,{user_id:t,role:"user"}),i.Z.success("Successfully joined team"),c(s=>s.filter(s=>s.team_id!==e))}catch(e){console.error("Error joining team:",e),i.Z.fromBackend("Failed to join team")}};return(0,r.jsx)(a.Zb,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,r.jsxs)(a.iA,{children:[(0,r.jsx)(a.ss,{children:(0,r.jsxs)(a.SC,{children:[(0,r.jsx)(a.xs,{children:"Team Name"}),(0,r.jsx)(a.xs,{children:"Description"}),(0,r.jsx)(a.xs,{children:"Members"}),(0,r.jsx)(a.xs,{children:"Models"}),(0,r.jsx)(a.xs,{children:"Actions"})]})}),(0,r.jsxs)(a.RM,{children:[o.map(e=>(0,r.jsxs)(a.SC,{children:[(0,r.jsx)(a.pj,{children:(0,r.jsx)(a.xv,{children:e.team_alias})}),(0,r.jsx)(a.pj,{children:(0,r.jsx)(a.xv,{children:e.description||"No description available"})}),(0,r.jsx)(a.pj,{children:(0,r.jsxs)(a.xv,{children:[e.members_with_roles.length," members"]})}),(0,r.jsx)(a.pj,{children:(0,r.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,s)=>(0,r.jsx)(a.Ct,{size:"xs",className:"mb-1",color:"blue",children:(0,r.jsx)(a.xv,{children:e.length>30?"".concat(e.slice(0,30),"..."):e})},s)):(0,r.jsx)(a.Ct,{size:"xs",color:"red",children:(0,r.jsx)(a.xv,{children:"All Proxy Models"})})})}),(0,r.jsx)(a.pj,{children:(0,r.jsx)(a.zx,{size:"xs",variant:"secondary",onClick:()=>d(e.team_id),children:"Join Team"})})]},e.team_id)),0===o.length&&(0,r.jsx)(a.SC,{children:(0,r.jsx)(a.pj,{colSpan:5,className:"text-center",children:(0,r.jsx)(a.xv,{children:"No available teams to join"})})})]})]})})}},6674:function(e,s,t){"use strict";t.d(s,{Z:function(){return d}});var r=t(57437),l=t(2265),a=t(73002),n=t(23639),i=t(96761),o=t(19250),c=t(9114),d=e=>{let{accessToken:s}=e,[t,d]=(0,l.useState)('{\n "model": "openai/gpt-4o",\n "messages": [\n {\n "role": "system",\n "content": "You are a helpful assistant."\n },\n {\n "role": "user",\n "content": "Explain quantum computing in simple terms"\n }\n ],\n "temperature": 0.7,\n "max_tokens": 500,\n "stream": true\n}'),[m,u]=(0,l.useState)(""),[x,h]=(0,l.useState)(!1),p=(e,s,t)=>{let r=JSON.stringify(s,null,2).split("\n").map(e=>" ".concat(e)).join("\n"),l=Object.entries(t).map(e=>{let[s,t]=e;return"-H '".concat(s,": ").concat(t,"'")}).join(" \\\n ");return"curl -X POST \\\n ".concat(e," \\\n ").concat(l?"".concat(l," \\\n "):"","-H 'Content-Type: application/json' \\\n -d '{\n").concat(r,"\n }'")},g=async()=>{h(!0);try{let e;try{e=JSON.parse(t)}catch(e){c.Z.fromBackend("Invalid JSON in request body"),h(!1);return}let r={call_type:"completion",request_body:e};if(!s){c.Z.fromBackend("No access token found"),h(!1);return}let l=await (0,o.transformRequestCall)(s,r);if(l.raw_request_api_base&&l.raw_request_body){let e=p(l.raw_request_api_base,l.raw_request_body,l.raw_request_headers||{});u(e),c.Z.success("Request transformed successfully")}else{let e="string"==typeof l?l:JSON.stringify(l);u(e),c.Z.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),c.Z.fromBackend("Failed to transform request")}finally{h(!1)}};return(0,r.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,r.jsx)(i.Z,{children:"Playground"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,r.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,r.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,r.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,r.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,r.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,r.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:t,onChange:e=>d(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,r.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,r.jsxs)(a.ZP,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:g,loading:x,children:[(0,r.jsx)("span",{children:"Transform"}),(0,r.jsx)("span",{children:"→"})]})})]}),(0,r.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,r.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,r.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,r.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,r.jsx)("br",{}),(0,r.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,r.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,r.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:m||'curl -X POST \\\n https://api.openai.com/v1/chat/completions \\\n -H \'Authorization: Bearer sk-xxx\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "model": "gpt-4",\n "messages": [\n {\n "role": "system",\n "content": "You are a helpful assistant."\n }\n ],\n "temperature": 0.7\n }\''}),(0,r.jsx)(a.ZP,{type:"text",icon:(0,r.jsx)(n.Z,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(m||""),c.Z.success("Copied to clipboard")}})]})]})]}),(0,r.jsx)("div",{className:"mt-4 text-right w-full",children:(0,r.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,r.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}},5183:function(e,s,t){"use strict";var r=t(57437),l=t(2265),a=t(19046),n=t(69734),i=t(19250),o=t(9114);s.Z=e=>{let{userID:s,userRole:t,accessToken:c}=e,{logoUrl:d,setLogoUrl:m}=(0,n.F)(),[u,x]=(0,l.useState)(""),[h,p]=(0,l.useState)(!1);(0,l.useEffect)(()=>{c&&g()},[c]);let g=async()=>{try{let s=(0,i.getProxyBaseUrl)(),t=await fetch(s?"".concat(s,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{Authorization:"Bearer ".concat(c),"Content-Type":"application/json"}});if(t.ok){var e;let s=await t.json(),r=(null===(e=s.values)||void 0===e?void 0:e.logo_url)||"";x(r),m(r||null)}}catch(e){console.error("Error fetching theme settings:",e)}},f=async()=>{p(!0);try{let e=(0,i.getProxyBaseUrl)();if((await fetch(e?"".concat(e,"/update/ui_theme_settings"):"/update/ui_theme_settings",{method:"PATCH",headers:{Authorization:"Bearer ".concat(c),"Content-Type":"application/json"},body:JSON.stringify({logo_url:u||null})})).ok)o.Z.success("Logo settings updated successfully!"),m(u||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating logo settings:",e),o.Z.fromBackend("Failed to update logo settings")}finally{p(!1)}},j=async()=>{x(""),m(null),p(!0);try{let e=(0,i.getProxyBaseUrl)();if((await fetch(e?"".concat(e,"/update/ui_theme_settings"):"/update/ui_theme_settings",{method:"PATCH",headers:{Authorization:"Bearer ".concat(c),"Content-Type":"application/json"},body:JSON.stringify({logo_url:null})})).ok)o.Z.success("Logo reset to default!");else throw Error("Failed to reset logo")}catch(e){console.error("Error resetting logo:",e),o.Z.fromBackend("Failed to reset logo")}finally{p(!1)}};return c?(0,r.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)(a.Dx,{className:"text-2xl font-bold mb-2",children:"Logo Customization"}),(0,r.jsx)(a.xv,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo."})]}),(0,r.jsx)(a.Zb,{className:"shadow-sm p-6",children:(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(a.xv,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,r.jsx)(a.oi,{placeholder:"https://example.com/logo.png",value:u,onValueChange:e=>{x(e),m(e||null)},className:"w-full"}),(0,r.jsx)(a.xv,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty to use the default LiteLLM logo"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(a.xv,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Current Logo"}),(0,r.jsx)("div",{className:"bg-gray-50 rounded-lg p-6 flex items-center justify-center min-h-[120px]",children:u?(0,r.jsx)("img",{src:u,alt:"Custom logo",className:"max-w-full max-h-24 object-contain",onError:e=>{var s;let t=e.target;t.style.display="none";let r=document.createElement("div");r.className="text-gray-500 text-sm",r.textContent="Failed to load image",null===(s=t.parentElement)||void 0===s||s.appendChild(r)}}):(0,r.jsx)(a.xv,{className:"text-gray-500 text-sm",children:"Default LiteLLM logo will be used"})})]}),(0,r.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,r.jsx)(a.zx,{onClick:f,loading:h,disabled:h,color:"indigo",children:"Save Changes"}),(0,r.jsx)(a.zx,{onClick:j,loading:h,disabled:h,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}}},function(e){e.O(0,[3665,6990,1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,5188,7906,2344,352,9165,1264,1487,7732,169,6433,1160,9888,8448,3250,1223,1162,8049,131,2202,874,4292,2162,2004,2012,8160,1598,2306,3801,4138,4734,3240,7155,6204,1739,773,6925,6600,8143,4289,2273,603,2019,2971,2117,1744],function(){return e(e.s=97731)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{97731:function(e,s,t){Promise.resolve().then(t.bind(t,17940))},23192:function(e,s,t){"use strict";t.d(s,{Z:function(){return h}});var r=t(57437);t(2265);var l=t(67101),a=t(12485),n=t(18135),i=t(35242),o=t(29706),c=t(77991),d=t(84264),m=t(25653),u=t(96362),x=e=>{let{href:s,className:t}=e;return(0,r.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",title:"Open documentation in a new tab",className:function(){for(var e=arguments.length,s=Array(e),t=0;t{let{proxySettings:s}=e,t="";return(null==s?void 0:s.PROXY_BASE_URL)!==void 0&&(null==s?void 0:s.PROXY_BASE_URL)&&(t=s.PROXY_BASE_URL),(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(l.Z,{className:"gap-2 p-8 h-[80vh] w-full mt-2",children:(0,r.jsxs)("div",{className:"mb-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",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)(x,{className:"ml-3 shrink-0",href:"https://docs.litellm.ai/docs/proxy/user_keys"})]}),(0,r.jsxs)(d.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)(n.Z,{children:[(0,r.jsxs)(i.Z,{children:[(0,r.jsx)(a.Z,{children:"OpenAI Python SDK"}),(0,r.jsx)(a.Z,{children:"LlamaIndex"}),(0,r.jsx)(a.Z,{children:"Langchain Py"})]}),(0,r.jsxs)(c.Z,{children:[(0,r.jsx)(o.Z,{children:(0,r.jsx)(m.Z,{language:"python",code:'import openai\nclient = openai.OpenAI(\n api_key="your_api_key",\n base_url="'.concat(t,'" # 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)')})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(m.Z,{language:"python",code:'import 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(t,'", # 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(t,'",\n api_key="sk-1234",\n api_version="2023-07-01-preview",\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)')})}),(0,r.jsx)(o.Z,{children:(0,r.jsx)(m.Z,{language:"python",code:'from 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(t,'",\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)')})})]})]})]})})})}},25653:function(e,s,t){"use strict";var r=t(57437),l=t(2265),a=t(30401),n=t(5136),i=t(17906),o=t(1479);s.Z=e=>{let{code:s,language:t}=e,[c,d]=(0,l.useState)(!1);return(0,r.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,r.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(s),d(!0),setTimeout(()=>d(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:c?(0,r.jsx)(a.Z,{size:16}):(0,r.jsx)(n.Z,{size:16})}),(0,r.jsx)(i.Z,{language:t,style:o.Z,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:s})]})}},17940:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return s1}});var r=t(57437),l=t(2265),a=t(99376),n=t(14474),i=t(21623),o=t(29827),c=t(65373),d=t(69734),m=t(21739),u=t(81598),x=t(77155),h=t(22004),p=t(90773),g=t(6925),f=t(64289),j=t(7166),y=t(49104),b=t(33801),v=t(18160),_=t(62306),Z=t(23192),w=t(13240),N=t(18143),k=t(66600),S=t(19250),C=t(44734),T=t(30603),z=t(6674),P=t(30874),A=t(39210),D=t(94138),I=t(42273),L=t(6204),E=t(5183),F=t(20831),R=t(12485),M=t(18135),O=t(35242),B=t(29706),q=t(77991),U=t(84264),V=t(96761),K=t(13634),H=t(82680),W=t(9114),Y=t(42673);let J=e=>{let s=Object.keys(Y.fK).find(s=>Y.fK[s]===e);if(s){let e=Y.Cl[s],t=Y.cd[e];return{displayName:e,logo:t,enumKey:s}}return{displayName:e,logo:"",enumKey:null}},G=e=>Y.fK[e]||null,X=(e,s)=>{let t=e.target,r=t.parentElement;if(r){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),r.replaceChild(e,t)}};var $=t(47323),Q=t(49566),ee=t(82422),es=t(3837),et=t(53410),er=t(74998),el=t(21626),ea=t(97214),en=t(28241),ei=t(58834),eo=t(69552),ec=t(71876);function ed(e){let{data:s,columns:t,isLoading:l=!1,loadingMessage:a="Loading...",emptyMessage:n="No data",getRowKey:i}=e;return(0,r.jsxs)(el.Z,{children:[(0,r.jsx)(ei.Z,{children:(0,r.jsx)(ec.Z,{children:t.map((e,s)=>(0,r.jsx)(eo.Z,{style:{width:e.width},children:e.header},s))})}),(0,r.jsx)(ea.Z,{children:l?(0,r.jsx)(ec.Z,{children:(0,r.jsx)(en.Z,{colSpan:t.length,className:"text-center",children:(0,r.jsx)(U.Z,{className:"text-gray-500",children:a})})}):s.length>0?s.map((e,s)=>(0,r.jsx)(ec.Z,{children:t.map((s,t)=>{var l;return(0,r.jsx)(en.Z,{children:s.cell?s.cell(e):String(null!==(l=e[s.accessor])&&void 0!==l?l:"")},t)})},i?i(e,s):s)):(0,r.jsx)(ec.Z,{children:(0,r.jsx)(en.Z,{colSpan:t.length,className:"text-center",children:(0,r.jsx)(U.Z,{className:"text-gray-500",children:n})})})})]})}var em=e=>{let{discountConfig:s,onDiscountChange:t,onRemoveProvider:a}=e,[n,i]=(0,l.useState)(null),[o,c]=(0,l.useState)(""),d=(e,s)=>{i(e),c((100*s).toString())},m=e=>{let s=parseFloat(o);!isNaN(s)&&s>=0&&s<=100&&t(e,(s/100).toString()),i(null),c("")},u=()=>{i(null),c("")},x=(e,s)=>{"Enter"===e.key?m(s):"Escape"===e.key&&u()},h=Object.entries(s).map(e=>{let[s,t]=e;return{provider:s,discount:t}}).sort((e,s)=>{let t=J(e.provider).displayName,r=J(s.provider).displayName;return t.localeCompare(r)});return(0,r.jsx)(ed,{data:h,columns:[{header:"Provider",cell:e=>{let{displayName:s,logo:t}=J(e.provider);return(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[t&&(0,r.jsx)("img",{src:t,alt:"".concat(s," logo"),className:"w-5 h-5",onError:e=>X(e,s)}),(0,r.jsx)("span",{className:"font-medium",children:s})]})}},{header:"Discount Percentage",cell:e=>(0,r.jsx)("div",{className:"flex items-center gap-2",children:n===e.provider?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Q.Z,{value:o,onValueChange:c,onKeyDown:s=>x(s,e.provider),placeholder:"5",className:"w-20",autoFocus:!0}),(0,r.jsx)("span",{className:"text-gray-600",children:"%"}),(0,r.jsx)($.Z,{icon:ee.Z,size:"sm",onClick:()=>m(e.provider),className:"cursor-pointer text-green-600 hover:text-green-700"}),(0,r.jsx)($.Z,{icon:es.Z,size:"sm",onClick:u,className:"cursor-pointer text-gray-600 hover:text-gray-700"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(U.Z,{className:"font-medium",children:[(100*e.discount).toFixed(1),"%"]}),(0,r.jsx)($.Z,{icon:et.Z,size:"sm",onClick:()=>d(e.provider,e.discount),className:"cursor-pointer text-blue-600 hover:text-blue-700"})]})}),width:"250px"},{header:"Actions",cell:e=>{let{displayName:s}=J(e.provider);return(0,r.jsx)($.Z,{icon:er.Z,size:"sm",onClick:()=>a(e.provider,s),className:"cursor-pointer hover:text-red-600"})},width:"80px"}],getRowKey:e=>e.provider,emptyMessage:"No provider discounts configured"})},eu=t(64504),ex=t(89970),eh=t(52787),ep=t(15424),eg=t(33145),ef=e=>{let{discountConfig:s,selectedProvider:t,newDiscount:l,onProviderChange:a,onDiscountChange:n,onAddProvider:i}=e;return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Provider",(0,r.jsx)(ex.Z,{title:"Select the LLM provider you want to configure a discount for",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please select a provider"}],children:(0,r.jsx)(eh.default,{showSearch:!0,placeholder:"Select provider",value:t,onChange:a,style:{width:"100%"},size:"large",optionFilterProp:"children",filterOption:(e,s)=>{var t;return String(null!==(t=null==s?void 0:s.label)&&void 0!==t?t:"").toLowerCase().includes(e.toLowerCase())},children:Object.entries(Y.Cl).map(e=>{let[t,l]=e,a=Y.fK[t];return a&&s[a]?null:(0,r.jsx)(eh.default.Option,{value:t,label:l,children:(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,r.jsx)(eg.default,{src:Y.cd[l],alt:"".concat(t," logo"),width:20,height:20,className:"w-5 h-5",onError:e=>X(e,l)}),(0,r.jsx)("span",{children:l})]})},t)})})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Discount Percentage",(0,r.jsx)(ex.Z,{title:"Enter a percentage value (e.g., 5 for 5% discount)",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),rules:[{required:!0,message:"Please enter a discount percentage"}],children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(eu.o,{placeholder:"5",value:l,onValueChange:n,className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500 flex-1"}),(0,r.jsx)("span",{className:"text-gray-600",children:"%"})]})}),(0,r.jsx)("div",{className:"flex items-center justify-end space-x-3 pt-6 border-t border-gray-100",children:(0,r.jsx)(eu.z,{variant:"primary",onClick:i,disabled:!t||!l,children:"Add Provider Discount"})})]})},ej=t(29271),ey=t(40875),eb=t(96362);let ev=e=>{let{items:s,children:t="Docs",className:a=""}=e,[n,i]=(0,l.useState)(!1),o=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let e=e=>{o.current&&!o.current.contains(e.target)&&i(!1)};return n&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[n]),(0,r.jsxs)("div",{className:"relative inline-block ".concat(a),ref:o,children:[(0,r.jsxs)("button",{type:"button",onClick:()=>i(!n),className:"inline-flex items-center gap-1 text-gray-500 hover:text-gray-700 text-xs transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded px-2 py-1","aria-expanded":n,"aria-haspopup":"true",children:[(0,r.jsx)("span",{children:t}),(0,r.jsx)(ey.Z,{className:"h-3 w-3 transition-transform ".concat(n?"rotate-180":""),"aria-hidden":"true"})]}),n&&(0,r.jsx)("div",{className:"absolute right-0 mt-1 w-56 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50",children:s.map((e,s)=>(0,r.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition-colors",onClick:()=>i(!1),children:[(0,r.jsx)("span",{children:e.label}),(0,r.jsx)(eb.Z,{className:"h-3.5 w-3.5 text-gray-400 flex-shrink-0 ml-2","aria-hidden":"true"})]},s))})]})};var e_=t(56522),eZ=t(25653),ew=()=>{let[e,s]=(0,l.useState)(""),[t,a]=(0,l.useState)(""),n=(0,l.useMemo)(()=>{let s=parseFloat(e),r=parseFloat(t);if(isNaN(s)||isNaN(r)||0===s||0===r)return null;let l=s+r;return{originalCost:l.toFixed(10),finalCost:s.toFixed(10),discountAmount:r.toFixed(10),discountPercentage:(r/l*100).toFixed(2)}},[e,t]);return(0,r.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-1",children:"Cost Calculation"}),(0,r.jsxs)(e_.x,{className:"text-xs text-gray-600",children:["Discounts are applied to provider costs: ",(0,r.jsx)("code",{className:"bg-gray-100 px-1.5 py-0.5 rounded text-xs",children:"final_cost = base_cost \xd7 (1 - discount%/100)"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-1",children:"Example"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"A 5% discount on a $10.00 request results in: $10.00 \xd7 (1 - 0.05) = $9.50"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-1",children:"Valid Range"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"Discount percentages must be between 0% and 100%"})]}),(0,r.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-2",children:"Validating Discounts"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600 mb-3",children:"Make a test request and check the response headers to verify discounts are applied:"}),(0,r.jsx)(eZ.Z,{language:"bash",code:'curl -X POST -i http://your-proxy:4000/chat/completions \\\n -H "Content-Type: application/json" \\\n -H "Authorization: Bearer sk-1234" \\\n -d \'{\n "model": "gemini/gemini-2.5-pro",\n "messages": [{"role": "user", "content": "Hello"}]\n }\''}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600 mt-3 mb-2",children:"Look for these headers in the response:"}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"Final cost after discount"})]}),(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-original"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"Original cost before discount"})]}),(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("code",{className:"bg-gray-100 px-2 py-1 rounded text-xs font-mono text-gray-800 whitespace-nowrap",children:"x-litellm-response-cost-discount-amount"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600",children:"Amount discounted"})]})]})]}),(0,r.jsxs)("div",{className:"pt-4 border-t border-gray-200",children:[(0,r.jsx)(e_.x,{className:"font-medium text-gray-900 text-sm mb-3",children:"Discount Calculator"}),(0,r.jsx)(e_.x,{className:"text-xs text-gray-600 mb-3",children:"Enter values from your response headers to verify the discount:"}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Response Cost (x-litellm-response-cost)"}),(0,r.jsx)(e_.o,{placeholder:"0.0171938125",value:e,onValueChange:s,className:"text-sm"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Discount Amount (x-litellm-response-cost-discount-amount)"}),(0,r.jsx)(e_.o,{placeholder:"0.0009049375",value:t,onValueChange:a,className:"text-sm"})]})]}),n&&(0,r.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[(0,r.jsx)(e_.x,{className:"text-sm font-medium text-blue-900 mb-2",children:"Calculated Results"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(e_.x,{className:"text-xs text-blue-800",children:"Original Cost:"}),(0,r.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",n.originalCost]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(e_.x,{className:"text-xs text-blue-800",children:"Final Cost:"}),(0,r.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",n.finalCost]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(e_.x,{className:"text-xs text-blue-800",children:"Discount Amount:"}),(0,r.jsxs)("code",{className:"text-xs font-mono text-blue-900",children:["$",n.discountAmount]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-blue-300",children:[(0,r.jsx)(e_.x,{className:"text-xs font-semibold text-blue-900",children:"Discount Applied:"}),(0,r.jsxs)(e_.x,{className:"text-sm font-bold text-blue-900",children:[n.discountPercentage,"%"]})]})]})]})]})]})};let eN=[{label:"Custom pricing for models",href:"https://docs.litellm.ai/docs/proxy/custom_pricing"},{label:"Spend tracking",href:"https://docs.litellm.ai/docs/proxy/cost_tracking"}];var ek=e=>{let{userID:s,userRole:t,accessToken:a}=e,[n,i]=(0,l.useState)({}),[o,c]=(0,l.useState)(void 0),[d,m]=(0,l.useState)(""),[u,x]=(0,l.useState)(!0),[h,p]=(0,l.useState)(!1),[g]=K.Z.useForm(),[f,j]=H.Z.useModal(),y=(0,l.useCallback)(async()=>{x(!0);try{let e=(0,S.getProxyBaseUrl)(),s=await fetch(e?"".concat(e,"/config/cost_discount_config"):"/config/cost_discount_config",{method:"GET",headers:{Authorization:"Bearer ".concat(a),"Content-Type":"application/json"}});if(s.ok){let e=await s.json();i(e.values||{})}else console.error("Failed to fetch discount config")}catch(e){console.error("Error fetching discount config:",e),W.Z.fromBackend("Failed to fetch discount configuration")}finally{x(!1)}},[a]);(0,l.useEffect)(()=>{a&&y()},[a,y]);let b=async e=>{try{let t=(0,S.getProxyBaseUrl)(),r=await fetch(t?"".concat(t,"/config/cost_discount_config"):"/config/cost_discount_config",{method:"PATCH",headers:{Authorization:"Bearer ".concat(a),"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok)W.Z.success("Discount configuration updated successfully"),await y();else{var s;let e=await r.json(),t=(null===(s=e.detail)||void 0===s?void 0:s.error)||e.detail||"Failed to update settings";W.Z.fromBackend(t)}}catch(e){console.error("Error updating discount config:",e),W.Z.fromBackend("Failed to update discount configuration")}},v=async()=>{if(!o||!d){W.Z.fromBackend("Please select a provider and enter discount percentage");return}let e=parseFloat(d);if(isNaN(e)||e<0||e>100){W.Z.fromBackend("Discount must be between 0% and 100%");return}let s=G(o);if(!s){W.Z.fromBackend("Invalid provider selected");return}if(n[s]){W.Z.fromBackend("Discount for ".concat(Y.Cl[o]," already exists. Edit it in the table above."));return}let t={...n,[s]:e/100};i(t),await b(t),c(void 0),m(""),p(!1)},_=async(e,s)=>{f.confirm({title:"Remove Provider Discount",icon:(0,r.jsx)(ej.Z,{}),content:"Are you sure you want to remove the discount for ".concat(s,"?"),okText:"Remove",okType:"danger",cancelText:"Cancel",onOk:async()=>{let s={...n};delete s[e],i(s),await b(s)}})},Z=async(e,s)=>{let t=parseFloat(s);if(!isNaN(t)&&t>=0&&t<=1){let s={...n,[e]:t};i(s),await b(s)}};return a?(0,r.jsxs)("div",{className:"w-full p-8",children:[j,(0,r.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between mb-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(V.Z,{children:"Cost Tracking Settings"}),(0,r.jsx)(ev,{items:eN})]}),(0,r.jsx)(U.Z,{className:"text-gray-500 mt-1",children:"Configure cost discounts for different LLM providers. Changes are saved automatically."})]}),(0,r.jsx)(F.Z,{onClick:()=>p(!0),className:"mt-4 md:mt-0",children:"+ Add Provider Discount"})]}),(0,r.jsx)("div",{className:"bg-white rounded-lg shadow w-full max-w-full",children:(0,r.jsxs)(M.Z,{children:[(0,r.jsxs)(O.Z,{className:"px-6 pt-4",children:[(0,r.jsx)(R.Z,{children:"Provider Discounts"}),(0,r.jsx)(R.Z,{children:"Test It"})]}),(0,r.jsxs)(q.Z,{children:[(0,r.jsx)(B.Z,{children:u?(0,r.jsx)("div",{className:"py-12 text-center",children:(0,r.jsx)(U.Z,{className:"text-gray-500",children:"Loading configuration..."})}):Object.keys(n).length>0?(0,r.jsx)("div",{className:"p-6",children:(0,r.jsx)(em,{discountConfig:n,onDiscountChange:Z,onRemoveProvider:_})}):(0,r.jsxs)("div",{className:"py-16 px-6 text-center",children:[(0,r.jsx)("svg",{className:"mx-auto h-12 w-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,r.jsx)(U.Z,{className:"text-gray-700 font-medium mb-2",children:"No provider discounts configured"}),(0,r.jsx)(U.Z,{className:"text-gray-500 text-sm",children:'Click "Add Provider Discount" to get started'})]})}),(0,r.jsx)(B.Z,{children:(0,r.jsx)("div",{className:"px-6 pb-4",children:(0,r.jsx)(ew,{})})})]})]})}),(0,r.jsx)(H.Z,{title:(0,r.jsx)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add Provider Discount"})}),open:h,width:1e3,onCancel:()=>{p(!1),g.resetFields(),c(void 0),m("")},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)(U.Z,{className:"text-sm text-gray-600 mb-6",children:"Select a provider and set its discount percentage. Enter a value between 0% and 100% (e.g., 5 for a 5% discount)."}),(0,r.jsx)(K.Z,{form:g,onFinish:e=>{v()},layout:"vertical",className:"space-y-6",children:(0,r.jsx)(ef,{discountConfig:n,selectedProvider:o,newDiscount:d,onProviderChange:c,onDiscountChange:m,onAddProvider:v})})]})})]}):null},eS=t(91323),eC=t(10012),eT=t(31857),ez=t(19226),eP=t(45937),eA=t(92403),eD=t(28595),eI=t(68208),eL=t(9775),eE=t(41361),eF=t(37527),eR=t(15883),eM=t(12660),eO=t(88009),eB=t(48231),eq=t(57400),eU=t(58630),eV=t(29436),eK=t(44625),eH=t(41169),eW=t(38434),eY=t(71891),eJ=t(55322),eG=t(11429),eX=t(20347),e$=t(79262),eQ=t(13959);let{Sider:e0}=ez.default;var e1=e=>{let{accessToken:s,setPage:t,userRole:l,defaultSelectedKey:a,collapsed:n=!1}=e,i=[{key:"1",page:"api-keys",label:"Virtual Keys",icon:(0,r.jsx)(eA.Z,{style:{fontSize:"18px"}})},{key:"3",page:"llm-playground",label:"Test Key",icon:(0,r.jsx)(eD.Z,{style:{fontSize:"18px"}}),roles:eX.LQ},{key:"2",page:"models",label:"Models + Endpoints",icon:(0,r.jsx)(eI.Z,{style:{fontSize:"18px"}}),roles:eX.LQ},{key:"12",page:"new_usage",label:"Usage",icon:(0,r.jsx)(eL.Z,{style:{fontSize:"18px"}}),roles:[...eX.ZL,...eX.lo]},{key:"6",page:"teams",label:"Teams",icon:(0,r.jsx)(eE.Z,{style:{fontSize:"18px"}})},{key:"17",page:"organizations",label:"Organizations",icon:(0,r.jsx)(eF.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"5",page:"users",label:"Internal Users",icon:(0,r.jsx)(eR.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"14",page:"api_ref",label:"API Reference",icon:(0,r.jsx)(eM.Z,{style:{fontSize:"18px"}})},{key:"16",page:"model-hub-table",label:"Model Hub",icon:(0,r.jsx)(eO.Z,{style:{fontSize:"18px"}})},{key:"15",page:"logs",label:"Logs",icon:(0,r.jsx)(eB.Z,{style:{fontSize:"18px"}})},{key:"11",page:"guardrails",label:"Guardrails",icon:(0,r.jsx)(eq.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"26",page:"tools",label:"Tools",icon:(0,r.jsx)(eU.Z,{style:{fontSize:"18px"}}),children:[{key:"18",page:"mcp-servers",label:"MCP Servers",icon:(0,r.jsx)(eU.Z,{style:{fontSize:"18px"}})},{key:"28",page:"search-tools",label:"Search Tools",icon:(0,r.jsx)(eV.Z,{style:{fontSize:"18px"}})},{key:"21",page:"vector-stores",label:"Vector Stores",icon:(0,r.jsx)(eK.Z,{style:{fontSize:"18px"}}),roles:eX.ZL}]},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,r.jsx)(eH.Z,{style:{fontSize:"18px"}}),children:[{key:"9",page:"caching",label:"Caching",icon:(0,r.jsx)(eK.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"25",page:"prompts",label:"Prompts",icon:(0,r.jsx)(eW.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"10",page:"budgets",label:"Budgets",icon:(0,r.jsx)(eF.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"20",page:"transform-request",label:"API Playground",icon:(0,r.jsx)(eM.Z,{style:{fontSize:"18px"}}),roles:[...eX.ZL,...eX.lo]},{key:"19",page:"tag-management",label:"Tag Management",icon:(0,r.jsx)(eY.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"4",page:"usage",label:"Old Usage",icon:(0,r.jsx)(eL.Z,{style:{fontSize:"18px"}})}]},{key:"settings",page:"settings",label:"Settings",icon:(0,r.jsx)(eJ.Z,{style:{fontSize:"18px"}}),roles:eX.ZL,children:[{key:"11",page:"general-settings",label:"Router Settings",icon:(0,r.jsx)(eJ.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"8",page:"settings",label:"Logging & Alerts",icon:(0,r.jsx)(eJ.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"13",page:"admin-panel",label:"Admin Settings",icon:(0,r.jsx)(eJ.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"27",page:"cost-tracking-settings",label:"Cost Tracking",icon:(0,r.jsx)(eL.Z,{style:{fontSize:"18px"}}),roles:eX.ZL},{key:"14",page:"ui-theme",label:"UI Theme",icon:(0,r.jsx)(eG.Z,{style:{fontSize:"18px"}}),roles:eX.ZL}]}],o=(e=>{let s=i.find(s=>s.page===e);if(s)return s.key;for(let s of i)if(s.children){let t=s.children.find(s=>s.page===e);if(t)return t.key}return"1"})(a),c=i.filter(e=>{let s=!e.roles||e.roles.includes(l);return console.log("Menu item ".concat(e.label,": roles=").concat(e.roles,", userRole=").concat(l,", hasAccess=").concat(s)),!!s&&(e.children&&(e.children=e.children.filter(e=>!e.roles||e.roles.includes(l))),!0)});return(0,r.jsx)(ez.default,{style:{minHeight:"100vh"},children:(0,r.jsxs)(e0,{theme:"light",width:220,collapsed:n,collapsedWidth:80,collapsible:!0,trigger:null,style:{transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",position:"relative"},children:[(0,r.jsx)(eQ.ZP,{theme:{components:{Menu:{iconSize:18,fontSize:14}}},children:(0,r.jsx)(eP.Z,{mode:"inline",selectedKeys:[o],defaultOpenKeys:n?[]:["llm-tools"],inlineCollapsed:n,className:"custom-sidebar-menu",style:{borderRight:0,backgroundColor:"transparent",fontSize:"14px"},items:c.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())),t(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())),t(e.page)}}})})}),(0,eX.tY)(l)&&!n&&(0,r.jsx)(e$.Z,{accessToken:s,width:220})]})})},e2=t(92019),e4=t(80443),e6=e=>{let{setPage:s,defaultSelectedKey:t,sidebarCollapsed:l}=e,{refactoredUIFlag:a}=(0,eT.Z)(),{accessToken:n,userRole:i}=(0,e4.Z)();return a?(0,r.jsx)(e2.Z,{accessToken:n,defaultSelectedKey:t,userRole:i}):(0,r.jsx)(e1,{accessToken:n,setPage:s,userRole:i,defaultSelectedKey:t,collapsed:l})},e5=t(93192),e3=t(23628),e8=t(86462),e9=t(47686),e7=t(64482),se=t(73002),ss=t(24199),st=t(46468),sr=t(25512),sl=t(33293),sa=t(88904),sn=t(87452),si=t(88829),so=t(72208),sc=t(41649),sd=t(12514),sm=t(49804),su=t(67101),sx=t(918),sh=t(97415),sp=t(2597),sg=t(59872),sf=t(32489),sj=t(76865),sy=t(95920),sb=t(68473),sv=t(51750);let s_=(e,s)=>{let t=[];return e&&e.models.length>0?(console.log("organization.models: ".concat(e.models)),t=e.models):t=s,(0,st.Ob)(t,s)},sZ=(e,s,t)=>"Admin"===e||!!t&&!!s&&t.some(e=>{var t;return null===(t=e.members)||void 0===t?void 0:t.some(e=>e.user_id===s&&"org_admin"===e.user_role)}),sw=(e,s,t)=>"Admin"===e?t||[]:t&&s?t.filter(e=>{var t;return null===(t=e.members)||void 0===t?void 0:t.some(e=>e.user_id===s&&"org_admin"===e.user_role)}):[];var sN=e=>{let{teams:s,searchParams:t,accessToken:a,setTeams:n,userID:i,userRole:o,organizations:c,premiumUser:d=!1}=e;console.log("organizations: ".concat(JSON.stringify(c)));let[m,u]=(0,l.useState)(""),[x,h]=(0,l.useState)(null),[p,g]=(0,l.useState)(null),[f,j]=(0,l.useState)(!1),[y,b]=(0,l.useState)({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"});(0,l.useEffect)(()=>{console.log("inside useeffect - ".concat(m)),a&&(0,A.Z)(a,i,o,x,n),eB()},[m]);let[v]=K.Z.useForm(),[_]=K.Z.useForm(),{Title:Z,Paragraph:w}=e5.default,[N,k]=(0,l.useState)(""),[C,T]=(0,l.useState)(!1),[z,P]=(0,l.useState)(null),[D,I]=(0,l.useState)(null),[L,E]=(0,l.useState)(!1),[V,Y]=(0,l.useState)(!1),[J,G]=(0,l.useState)(!1),[X,ee]=(0,l.useState)(!1),[es,ed]=(0,l.useState)([]),[em,eu]=(0,l.useState)(!1),[eg,ef]=(0,l.useState)(null),[ej,ey]=(0,l.useState)([]),[eb,ev]=(0,l.useState)({}),[e_,eZ]=(0,l.useState)([]),[ew,eN]=(0,l.useState)({}),[ek,eS]=(0,l.useState)([]),[eC,eT]=(0,l.useState)([]),[ez,eP]=(0,l.useState)(!1),[eA,eD]=(0,l.useState)(""),[eI,eL]=(0,l.useState)({});(0,l.useEffect)(()=>{console.log("currentOrgForCreateTeam: ".concat(p));let e=s_(p,es);console.log("models: ".concat(e)),ey(e),v.setFieldValue("models",[])},[p,es]),(0,l.useEffect)(()=>{if(V){let e=sw(o,i,c);if(1===e.length){let s=e[0];v.setFieldValue("organization_id",s.organization_id),g(s)}else v.setFieldValue("organization_id",(null==x?void 0:x.organization_id)||null),g(x)}},[V,o,i,c,x]),(0,l.useEffect)(()=>{(async()=>{try{if(null==a)return;let e=(await (0,S.getGuardrailsList)(a)).guardrails.map(e=>e.guardrail_name);eZ(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})()},[a]);let eE=async()=>{try{if(null==a)return;let e=await (0,S.fetchMCPAccessGroups)(a);eT(e)}catch(e){console.error("Failed to fetch MCP access groups:",e)}};(0,l.useEffect)(()=>{eE()},[a]),(0,l.useEffect)(()=>{s&&ev(s.reduce((e,s)=>(e[s.team_id]={keys:s.keys||[],team_info:{members_with_roles:s.members_with_roles||[]}},e),{}))},[s]);let eF=async e=>{ef(e),eu(!0)},eR=async()=>{if(null!=eg&&null!=s&&null!=a){try{await (0,S.teamDeleteCall)(a,eg),(0,A.Z)(a,i,o,x,n)}catch(e){console.error("Error deleting the team:",e)}eu(!1),ef(null)}},eM=()=>{eu(!1),ef(null)};(0,l.useEffect)(()=>{(async()=>{try{if(null===i||null===o||null===a)return;let e=await (0,st.K2)(i,o,a);e&&ed(e)}catch(e){console.error("Error fetching user models:",e)}})()},[a,i,o,s]);let eO=async e=>{try{if(console.log("formValues: ".concat(JSON.stringify(e))),null!=a){var t,r,l;let i=null==e?void 0:e.team_alias,o=null!==(l=null==s?void 0:s.map(e=>e.team_alias))&&void 0!==l?l:[],c=(null==e?void 0:e.organization_id)||(null==x?void 0:x.organization_id);if(""===c||"string"!=typeof c?e.organization_id=null:e.organization_id=c.trim(),o.includes(i))throw Error("Team alias ".concat(i," already exists, please pick another alias"));if(W.Z.info("Creating Team"),ek.length>0){let s={};if(e.metadata)try{s=JSON.parse(e.metadata)}catch(e){console.warn("Invalid JSON in metadata field, starting with empty object")}s={...s,logging:ek.filter(e=>e.callback_name)},e.metadata=JSON.stringify(s)}if(e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0||e.allowed_mcp_servers_and_groups&&((null===(t=e.allowed_mcp_servers_and_groups.servers)||void 0===t?void 0:t.length)>0||(null===(r=e.allowed_mcp_servers_and_groups.accessGroups)||void 0===r?void 0:r.length)>0||e.allowed_mcp_servers_and_groups.toolPermissions)){if(e.object_permission={},e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission.vector_stores=e.allowed_vector_store_ids,delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups){let{servers:s,accessGroups:t}=e.allowed_mcp_servers_and_groups;s&&s.length>0&&(e.object_permission.mcp_servers=s),t&&t.length>0&&(e.object_permission.mcp_access_groups=t),delete e.allowed_mcp_servers_and_groups}e.mcp_tool_permissions&&Object.keys(e.mcp_tool_permissions).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=e.mcp_tool_permissions,delete e.mcp_tool_permissions)}e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),Object.keys(eI).length>0&&(e.model_aliases=eI);let d=await (0,S.teamCreateCall)(a,e);null!==s?n([...s,d]):n([d]),console.log("response for team create call: ".concat(d)),W.Z.success("Team created"),v.resetFields(),eS([]),eL({}),Y(!1)}}catch(e){console.error("Error creating the team:",e),W.Z.fromBackend("Error creating the team: "+e)}},eB=()=>{u(new Date().toLocaleString())},eq=(e,s)=>{let t={...y,[e]:s};b(t),a&&(0,S.v2TeamListCall)(a,t.organization_id||null,null,t.team_id||null,t.team_alias||null).then(e=>{e&&e.teams&&n(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})};return(0,r.jsx)("div",{className:"w-full mx-4 h-[75vh]",children:(0,r.jsx)(su.Z,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,r.jsxs)(sm.Z,{numColSpan:1,className:"flex flex-col gap-2",children:[sZ(o,i,c)&&(0,r.jsx)(F.Z,{className:"w-fit",onClick:()=>Y(!0),children:"+ Create New Team"}),D?(0,r.jsx)(sl.Z,{teamId:D,onUpdate:e=>{n(s=>{if(null==s)return s;let t=s.map(s=>e.team_id===s.team_id?(0,sg.nl)(s,e):s);return a&&(0,A.Z)(a,i,o,x,n),t})},onClose:()=>{I(null),E(!1)},accessToken:a,is_team_admin:(e=>{if(null==e||null==e.members_with_roles)return!1;for(let s=0;se.team_id===D)),is_proxy_admin:"Admin"==o,userModels:es,editTeam:L}):(0,r.jsxs)(M.Z,{className:"gap-2 h-[75vh] w-full",children:[(0,r.jsxs)(O.Z,{className:"flex justify-between mt-2 w-full items-center",children:[(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)(R.Z,{children:"Your Teams"}),(0,r.jsx)(R.Z,{children:"Available Teams"}),(0,eX.tY)(o||"")&&(0,r.jsx)(R.Z,{children:"Default Team Settings"})]}),(0,r.jsxs)("div",{className:"flex items-center space-x-2",children:[m&&(0,r.jsxs)(U.Z,{children:["Last Refreshed: ",m]}),(0,r.jsx)($.Z,{icon:e3.Z,variant:"shadow",size:"xs",className:"self-center",onClick:eB})]})]}),(0,r.jsxs)(q.Z,{children:[(0,r.jsxs)(B.Z,{children:[(0,r.jsxs)(U.Z,{children:["Click on “Team ID” to view team details ",(0,r.jsx)("b",{children:"and"})," manage team members."]}),(0,r.jsx)(su.Z,{numItems:1,className:"gap-2 pt-2 pb-2 h-[75vh] w-full mt-2",children:(0,r.jsx)(sm.Z,{numColSpan:1,children:(0,r.jsxs)(sd.Z,{className:"w-full mx-auto flex-auto overflow-hidden overflow-y-auto max-h-[50vh]",children:[(0,r.jsx)("div",{className:"border-b px-6 py-4",children:(0,r.jsxs)("div",{className:"flex flex-col space-y-4",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 Team Name...",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:y.team_alias,onChange:e=>eq("team_alias",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)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2 ".concat(f?"bg-gray-100":""),onClick:()=>j(!f),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"})}),"Filters",(y.team_id||y.team_alias||y.organization_id)&&(0,r.jsx)("span",{className:"w-2 h-2 rounded-full bg-blue-500"})]}),(0,r.jsxs)("button",{className:"px-3 py-2 text-sm border rounded-md hover:bg-gray-50 flex items-center gap-2",onClick:()=>{b({team_id:"",team_alias:"",organization_id:"",sort_by:"created_at",sort_order:"desc"}),a&&(0,S.v2TeamListCall)(a,null,i||null,null,null).then(e=>{e&&e.teams&&n(e.teams)}).catch(e=>{console.error("Error fetching teams:",e)})},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:"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"})}),"Reset Filters"]})]}),f&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mt-3",children:[(0,r.jsxs)("div",{className:"relative w-64",children:[(0,r.jsx)("input",{type:"text",placeholder:"Enter Team 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:y.team_id,onChange:e=>eq("team_id",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:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})]}),(0,r.jsx)("div",{className:"w-64",children:(0,r.jsx)(sr.P,{value:y.organization_id||"",onValueChange:e=>eq("organization_id",e),placeholder:"Select Organization",children:null==c?void 0:c.map(e=>(0,r.jsx)(sr.Q,{value:e.organization_id||"",children:e.organization_alias||e.organization_id},e.organization_id))})})]})]})}),(0,r.jsxs)(el.Z,{children:[(0,r.jsx)(ei.Z,{children:(0,r.jsxs)(ec.Z,{children:[(0,r.jsx)(eo.Z,{children:"Team Name"}),(0,r.jsx)(eo.Z,{children:"Team ID"}),(0,r.jsx)(eo.Z,{children:"Created"}),(0,r.jsx)(eo.Z,{children:"Spend (USD)"}),(0,r.jsx)(eo.Z,{children:"Budget (USD)"}),(0,r.jsx)(eo.Z,{children:"Models"}),(0,r.jsx)(eo.Z,{children:"Organization"}),(0,r.jsx)(eo.Z,{children:"Info"})]})}),(0,r.jsx)(ea.Z,{children:s&&s.length>0?s.filter(e=>!x||e.organization_id===x.organization_id).sort((e,s)=>new Date(s.created_at).getTime()-new Date(e.created_at).getTime()).map(e=>(0,r.jsxs)(ec.Z,{children:[(0,r.jsx)(en.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.team_alias}),(0,r.jsx)(en.Z,{children:(0,r.jsx)("div",{className:"overflow-hidden",children:(0,r.jsx)(ex.Z,{title:e.team_id,children:(0,r.jsxs)(F.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:()=>{I(e.team_id)},children:[e.team_id.slice(0,7),"..."]})})})}),(0,r.jsx)(en.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:e.created_at?new Date(e.created_at).toLocaleDateString():"N/A"}),(0,r.jsx)(en.Z,{style:{maxWidth:"4px",whiteSpace:"pre-wrap",overflow:"hidden"},children:(0,sg.pw)(e.spend,4)}),(0,r.jsx)(en.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)(en.Z,{style:{maxWidth:"8-x",whiteSpace:"pre-wrap",overflow:"hidden"},className:e.models.length>3?"px-0":"",children:(0,r.jsx)("div",{className:"flex flex-col",children:Array.isArray(e.models)?(0,r.jsx)("div",{className:"flex flex-col",children:0===e.models.length?(0,r.jsx)(sc.Z,{size:"xs",className:"mb-1",color:"red",children:(0,r.jsx)(U.Z,{children:"All Proxy Models"})}):(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"flex items-start",children:[e.models.length>3&&(0,r.jsx)("div",{children:(0,r.jsx)($.Z,{icon:ew[e.team_id]?e8.Z:e9.Z,className:"cursor-pointer",size:"xs",onClick:()=>{eN(s=>({...s,[e.team_id]:!s[e.team_id]}))}})}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.models.slice(0,3).map((e,s)=>"all-proxy-models"===e?(0,r.jsx)(sc.Z,{size:"xs",color:"red",children:(0,r.jsx)(U.Z,{children:"All Proxy Models"})},s):(0,r.jsx)(sc.Z,{size:"xs",color:"blue",children:(0,r.jsx)(U.Z,{children:e.length>30?"".concat((0,st.W0)(e).slice(0,30),"..."):(0,st.W0)(e)})},s)),e.models.length>3&&!ew[e.team_id]&&(0,r.jsx)(sc.Z,{size:"xs",color:"gray",className:"cursor-pointer",children:(0,r.jsxs)(U.Z,{children:["+",e.models.length-3," ",e.models.length-3==1?"more model":"more models"]})}),ew[e.team_id]&&(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:e.models.slice(3).map((e,s)=>"all-proxy-models"===e?(0,r.jsx)(sc.Z,{size:"xs",color:"red",children:(0,r.jsx)(U.Z,{children:"All Proxy Models"})},s+3):(0,r.jsx)(sc.Z,{size:"xs",color:"blue",children:(0,r.jsx)(U.Z,{children:e.length>30?"".concat((0,st.W0)(e).slice(0,30),"..."):(0,st.W0)(e)})},s+3))})]})]})})}):null})}),(0,r.jsx)(en.Z,{children:e.organization_id}),(0,r.jsxs)(en.Z,{children:[(0,r.jsxs)(U.Z,{children:[eb&&e.team_id&&eb[e.team_id]&&eb[e.team_id].keys&&eb[e.team_id].keys.length," ","Keys"]}),(0,r.jsxs)(U.Z,{children:[eb&&e.team_id&&eb[e.team_id]&&eb[e.team_id].team_info&&eb[e.team_id].team_info.members_with_roles&&eb[e.team_id].team_info.members_with_roles.length," ","Members"]})]}),(0,r.jsx)(en.Z,{children:"Admin"==o?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)($.Z,{icon:et.Z,size:"sm",onClick:()=>{I(e.team_id),E(!0)}}),(0,r.jsx)($.Z,{onClick:()=>eF(e.team_id),icon:er.Z,size:"sm"})]}):null})]},e.team_id)):null})]}),em&&(()=>{var e;let t=null==s?void 0:s.find(e=>e.team_id===eg),l=(null==t?void 0:t.team_alias)||"",a=(null==t?void 0:null===(e=t.keys)||void 0===e?void 0:e.length)||0,n=eA===l;return(0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-2xl min-h-[380px] py-6 overflow-hidden transform transition-all flex flex-col justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-gray-200",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Delete Team"}),(0,r.jsx)("button",{onClick:()=>{eM(),eD("")},className:"text-gray-400 hover:text-gray-500 focus:outline-none",children:(0,r.jsx)(sf.Z,{size:20})})]}),(0,r.jsxs)("div",{className:"px-6 py-4",children:[a>0&&(0,r.jsxs)("div",{className:"flex items-start gap-3 p-4 bg-red-50 border border-red-100 rounded-md mb-5",children:[(0,r.jsx)("div",{className:"text-red-500 mt-0.5",children:(0,r.jsx)(sj.Z,{size:20})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-base font-medium text-red-600",children:["Warning: This team has ",a," associated key",a>1?"s":"","."]}),(0,r.jsx)("p",{className:"text-base text-red-600 mt-2",children:"Deleting the team will also delete all associated keys. This action is irreversible."})]})]}),(0,r.jsx)("p",{className:"text-base text-gray-600 mb-5",children:"Are you sure you want to force delete this team and all its keys?"}),(0,r.jsxs)("div",{className:"mb-5",children:[(0,r.jsxs)("label",{className:"block text-base font-medium text-gray-700 mb-2",children:["Type ",(0,r.jsx)("span",{className:"underline",children:l})," to confirm deletion:"]}),(0,r.jsx)("input",{type:"text",value:eA,onChange:e=>eD(e.target.value),placeholder:"Enter team name exactly",className:"w-full px-4 py-3 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-base",autoFocus:!0})]})]})]}),(0,r.jsxs)("div",{className:"px-6 py-4 bg-gray-50 flex justify-end gap-4",children:[(0,r.jsx)("button",{onClick:()=>{eM(),eD("")},className:"px-5 py-3 bg-white border border-gray-300 rounded-md text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",children:"Cancel"}),(0,r.jsx)("button",{onClick:eR,disabled:!n,className:"px-5 py-3 rounded-md text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 ".concat(n?"bg-red-600 hover:bg-red-700":"bg-red-300 cursor-not-allowed"),children:"Force Delete"})]})]})})})()]})})})]}),(0,r.jsx)(B.Z,{children:(0,r.jsx)(sx.Z,{accessToken:a,userID:i})}),(0,eX.tY)(o||"")&&(0,r.jsx)(B.Z,{children:(0,r.jsx)(sa.Z,{accessToken:a,userID:i||"",userRole:o||""})})]})]}),sZ(o,i,c)&&(0,r.jsx)(H.Z,{title:"Create Team",visible:V,width:1e3,footer:null,onOk:()=>{Y(!1),v.resetFields(),eS([]),eL({})},onCancel:()=>{Y(!1),v.resetFields(),eS([]),eL({})},children:(0,r.jsxs)(K.Z,{form:v,onFinish:eO,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(K.Z.Item,{label:"Team Name",name:"team_alias",rules:[{required:!0,message:"Please input a team name"}],children:(0,r.jsx)(Q.Z,{placeholder:""})}),(()=>{let e=sw(o,i,c),s="Admin"!==o,t=1===e.length,l=0===e.length;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Organization"," ",(0,r.jsx)(ex.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)(ep.Z,{style:{marginLeft:"4px"}})})]}),name:"organization_id",initialValue:x?x.organization_id:null,className:"mt-8",rules:s?[{required:!0,message:"Please select an organization"}]:[],help:t?"You can only create teams within this organization":s?"required":"",children:(0,r.jsx)(eh.default,{showSearch:!0,allowClear:!s,disabled:t,placeholder:l?"No organizations available":"Search or select an Organization",onChange:s=>{v.setFieldValue("organization_id",s),g((null==e?void 0:e.find(e=>e.organization_id===s))||null)},filterOption:(e,s)=>{var t;return!!s&&((null===(t=s.children)||void 0===t?void 0:t.toString())||"").toLowerCase().includes(e.toLowerCase())},optionFilterProp:"children",children:null==e?void 0:e.map(e=>(0,r.jsxs)(eh.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))})}),s&&!t&&e.length>1&&(0,r.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,r.jsx)(U.Z,{className:"text-blue-800 text-sm",children:"Please select an organization to create a team for. You can only create teams within organizations where you are an admin."})})]})})(),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Models"," ",(0,r.jsx)(ex.Z,{title:"These are the models that your selected team has access to",children:(0,r.jsx)(ep.Z,{style:{marginLeft:"4px"}})})]}),name:"models",children:(0,r.jsxs)(eh.default,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},children:[(0,r.jsx)(eh.default.Option,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),ej.map(e=>(0,r.jsx)(eh.default.Option,{value:e,children:(0,st.W0)(e)},e))]})}),(0,r.jsx)(K.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(ss.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(K.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(eh.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(eh.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(eh.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(eh.default.Option,{value:"30d",children:"monthly"})]})}),(0,r.jsx)(K.Z.Item,{label:"Tokens per minute Limit (TPM)",name:"tpm_limit",children:(0,r.jsx)(ss.Z,{step:1,width:400})}),(0,r.jsx)(K.Z.Item,{label:"Requests per minute Limit (RPM)",name:"rpm_limit",children:(0,r.jsx)(ss.Z,{step:1,width:400})}),(0,r.jsxs)(sn.Z,{className:"mt-20 mb-8",onClick:()=>{ez||(eE(),eP(!0))},children:[(0,r.jsx)(so.Z,{children:(0,r.jsx)("b",{children:"Additional Settings"})}),(0,r.jsxs)(si.Z,{children:[(0,r.jsx)(K.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)(Q.Z,{onChange:e=>{e.target.value=e.target.value.trim()}})}),(0,r.jsx)(K.Z.Item,{label:"Team Member Budget (USD)",name:"team_member_budget",normalize:e=>e?Number(e):void 0,tooltip:"This is the individual budget for a user in the team.",children:(0,r.jsx)(ss.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(K.Z.Item,{label:"Team Member Key Duration (eg: 1d, 1mo)",name:"team_member_key_duration",tooltip:"Set a limit to the duration of a team member's key. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days), 1mo (month)",children:(0,r.jsx)(Q.Z,{placeholder:"e.g., 30d"})}),(0,r.jsx)(K.Z.Item,{label:"Team Member RPM Limit",name:"team_member_rpm_limit",tooltip:"The RPM (Requests Per Minute) limit for individual team members",children:(0,r.jsx)(ss.Z,{step:1,width:400})}),(0,r.jsx)(K.Z.Item,{label:"Team Member TPM Limit",name:"team_member_tpm_limit",tooltip:"The TPM (Tokens Per Minute) limit for individual team members",children:(0,r.jsx)(ss.Z,{step:1,width:400})}),(0,r.jsx)(K.Z.Item,{label:"Metadata",name:"metadata",help:"Additional team metadata. Enter metadata as JSON object.",children:(0,r.jsx)(e7.default.TextArea,{rows:4})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Guardrails"," ",(0,r.jsx)(ex.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)(ep.Z,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-8",help:"Select existing guardrails or enter new ones",children:(0,r.jsx)(eh.default,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter guardrails",options:e_.map(e=>({value:e,label:e}))})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,r.jsx)(ex.Z,{title:"Select which vector stores this team can access by default. Leave empty for access to all vector stores",children:(0,r.jsx)(ep.Z,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-8",help:"Select vector stores this team can access. Leave empty for access to all vector stores",children:(0,r.jsx)(sh.Z,{onChange:e=>v.setFieldValue("allowed_vector_store_ids",e),value:v.getFieldValue("allowed_vector_store_ids"),accessToken:a||"",placeholder:"Select vector stores (optional)"})})]})]}),(0,r.jsxs)(sn.Z,{className:"mt-8 mb-8",children:[(0,r.jsx)(so.Z,{children:(0,r.jsx)("b",{children:"MCP Settings"})}),(0,r.jsxs)(si.Z,{children:[(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,r.jsx)(ex.Z,{title:"Select which MCP servers or access groups this team can access",children:(0,r.jsx)(ep.Z,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",className:"mt-4",help:"Select MCP servers or access groups this team can access",children:(0,r.jsx)(sy.Z,{onChange:e=>v.setFieldValue("allowed_mcp_servers_and_groups",e),value:v.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:a||"",placeholder:"Select MCP servers or access groups (optional)"})}),(0,r.jsx)(K.Z.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,r.jsx)(e7.default,{type:"hidden"})}),(0,r.jsx)(K.Z.Item,{noStyle:!0,shouldUpdate:(e,s)=>e.allowed_mcp_servers_and_groups!==s.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==s.mcp_tool_permissions,children:()=>{var e;return(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsx)(sb.Z,{accessToken:a||"",selectedServers:(null===(e=v.getFieldValue("allowed_mcp_servers_and_groups"))||void 0===e?void 0:e.servers)||[],toolPermissions:v.getFieldValue("mcp_tool_permissions")||{},onChange:e=>v.setFieldsValue({mcp_tool_permissions:e})})})}})]})]}),(0,r.jsxs)(sn.Z,{className:"mt-8 mb-8",children:[(0,r.jsx)(so.Z,{children:(0,r.jsx)("b",{children:"Logging Settings"})}),(0,r.jsx)(si.Z,{children:(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(sp.Z,{value:ek,onChange:eS,premiumUser:d})})})]}),(0,r.jsxs)(sn.Z,{className:"mt-8 mb-8",children:[(0,r.jsx)(so.Z,{children:(0,r.jsx)("b",{children:"Model Aliases"})}),(0,r.jsx)(si.Z,{children:(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)(U.Z,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used by team members in API calls. This allows you to create shortcuts for specific models."}),(0,r.jsx)(sv.Z,{accessToken:a||"",initialModelAliases:eI,onAliasUpdate:eL,showExampleConfig:!1})]})})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(se.ZP,{htmlType:"submit",children:"Create Team"})})]})})]})})})},sk=t(16593),sS=t(12322),sC=t(58927);let sT=(e,s,t,l)=>[{accessorKey:"search_tool_id",header:"Search Tool ID",cell:s=>{var t;let{row:l}=s;return(0,r.jsxs)("button",{onClick:()=>e(l.original.search_tool_id),className:"font-mono text-blue-500 bg-blue-50 hover:bg-blue-100 text-xs font-normal px-2 py-0.5 text-left w-full truncate whitespace-nowrap cursor-pointer max-w-[15ch]",children:[null===(t=l.original.search_tool_id)||void 0===t?void 0:t.slice(0,7),"..."]})}},{accessorKey:"search_tool_name",header:"Name",cell:e=>{let{getValue:s}=e;return(0,r.jsx)("span",{className:"font-medium",children:s()})}},{id:"provider",header:"Provider",cell:e=>{let{row:s}=e,t=s.original.litellm_params.search_provider,a=l.find(e=>e.provider_name===t),n=(null==a?void 0:a.ui_friendly_name)||t;return(0,r.jsx)("span",{className:"text-sm",children:n})}},{header:"Created At",accessorKey:"created_at",sortingFn:"datetime",cell:e=>{let{row:s}=e,t=s.original;return(0,r.jsx)("span",{className:"text-xs",children:t.created_at?new Date(t.created_at).toLocaleDateString():"-"})}},{header:"Updated At",accessorKey:"updated_at",sortingFn:"datetime",cell:e=>{let{row:s}=e,t=s.original;return(0,r.jsx)("span",{className:"text-xs",children:t.updated_at?new Date(t.updated_at).toLocaleDateString():"-"})}},{id:"actions",header:"Actions",cell:e=>{let{row:l}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(sC.J,{icon:et.Z,size:"sm",onClick:()=>s(l.original.search_tool_id),className:"cursor-pointer"}),(0,r.jsx)(sC.J,{icon:er.Z,size:"sm",onClick:()=>t(l.original.search_tool_id),className:"cursor-pointer"})]})}}];var sz=t(10900),sP=t(30401),sA=t(78867),sD=t(42264),sI=t(87908),sL=t(61935);let{Text:sE}=e5.default,sF=e=>{var s,t,a,n;let{searchToolName:i,accessToken:o,className:c=""}=e,[d,m]=(0,l.useState)(""),[u,x]=(0,l.useState)(!1),[h,p]=(0,l.useState)([]),[g,f]=(0,l.useState)({}),[j,y]=(0,l.useState)(!1),b=async()=>{if(!d.trim()){sD.ZP.warning("Please enter a search query");return}x(!0);let e=performance.now();try{let s=await (0,S.searchToolQueryCall)(o,i,d),t=performance.now(),r={query:d,response:s,timestamp:Date.now(),latency:Math.round(t-e)};p(e=>[r,...e])}catch(e){console.error("Error querying search tool:",e),W.Z.fromBackend("Failed to query search tool")}finally{x(!1)}},v=e=>new Date(e).toLocaleString(),_=(e,s)=>{let t="".concat(e,"-").concat(s);f(e=>({...e,[t]:!e[t]}))},Z=(0,r.jsx)(sL.Z,{style:{fontSize:24},spin:!0}),w=h.length>0?h[0]:null;return(0,r.jsxs)(sd.Z,{className:"mt-6",children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(V.Z,{children:"Test Search Tool"})}),(0,r.jsxs)("div",{className:"flex flex-col",style:{minHeight:"600px"},children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsxs)("div",{className:"flex items-stretch gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center flex-1 bg-white rounded-lg px-4 transition-all duration-200",style:{border:j?"2px solid #3b82f6":"2px solid #e5e7eb",boxShadow:j?"0 0 0 3px rgba(59, 130, 246, 0.1)":"0 1px 2px 0 rgba(0, 0, 0, 0.05)",height:"48px"},children:[(0,r.jsx)(eV.Z,{className:"text-gray-400 mr-3",style:{fontSize:"18px"}}),(0,r.jsx)(e7.default,{value:d,onChange:e=>m(e.target.value),onFocus:()=>y(!0),onBlur:()=>y(!1),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),b())},placeholder:"Enter your search query...",disabled:u,bordered:!1,style:{fontSize:"15px",padding:0,height:"100%",boxShadow:"none"}})]}),(0,r.jsx)(se.ZP,{type:"primary",onClick:b,disabled:u||!d.trim(),icon:(0,r.jsx)(eV.Z,{}),loading:u,style:{height:"48px",paddingLeft:"24px",paddingRight:"24px",borderRadius:"8px",fontWeight:500,fontSize:"15px",backgroundColor:u||!d.trim()?void 0:"#1890ff",borderColor:u||!d.trim()?void 0:"#1890ff",boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:"Search"})]})}),(0,r.jsx)("div",{className:"flex-1",children:w||u?(0,r.jsxs)("div",{children:[u&&(0,r.jsxs)("div",{className:"flex flex-col justify-center items-center py-16",children:[(0,r.jsx)(sI.Z,{indicator:Z}),(0,r.jsx)(sE,{className:"mt-4 text-gray-600 font-medium",children:"Searching..."})]}),w&&!u&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)(sE,{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"Search Query"}),(0,r.jsx)("div",{className:"text-base font-semibold text-gray-900 mt-1.5",children:w.query})]}),(0,r.jsxs)("div",{className:"text-right ml-4",children:[(0,r.jsx)(sE,{className:"text-xs text-gray-500",children:v(w.timestamp)}),(0,r.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,r.jsxs)("div",{className:"text-sm font-semibold text-blue-600",children:[(null===(t=w.response)||void 0===t?void 0:null===(s=t.results)||void 0===s?void 0:s.length)||0," ",(null===(n=w.response)||void 0===n?void 0:null===(a=n.results)||void 0===a?void 0:a.length)===1?"result":"results"]}),void 0!==w.latency&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-gray-400",children:"•"}),(0,r.jsxs)("div",{className:"text-sm font-semibold text-green-600",children:[w.latency,"ms"]})]})]})]})]})}),w.response&&w.response.results&&w.response.results.length>0?(0,r.jsx)("div",{className:"space-y-3",children:w.response.results.map((e,s)=>{let t=g["0-".concat(s)]||!1;return(0,r.jsx)("div",{className:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200",style:{boxShadow:"0 1px 2px 0 rgba(0, 0, 0, 0.05)"},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",e.currentTarget.style.borderColor="#e0e7ff"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="0 1px 2px 0 rgba(0, 0, 0, 0.05)",e.currentTarget.style.borderColor="#e5e7eb"},children:(0,r.jsxs)("div",{className:"p-5",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-2",children:[(0,r.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-lg font-semibold text-blue-600 hover:text-blue-700 flex-1 leading-snug",style:{textDecoration:"none"},onMouseEnter:e=>e.currentTarget.style.textDecoration="underline",onMouseLeave:e=>e.currentTarget.style.textDecoration="none",children:e.title}),(0,r.jsx)(se.ZP,{type:"text",size:"small",className:"flex-shrink-0",icon:(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:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),onClick:()=>window.open(e.url,"_blank"),style:{color:"#6b7280"}})]}),(0,r.jsx)("div",{className:"text-sm text-green-700 mb-3 truncate font-medium",children:e.url}),(0,r.jsx)("div",{className:"text-sm text-gray-700 leading-relaxed",children:t?e.snippet:"".concat(e.snippet.substring(0,200)).concat(e.snippet.length>200?"...":"")}),e.snippet.length>200&&(0,r.jsx)(se.ZP,{type:"link",size:"small",className:"mt-3 p-0 h-auto",onClick:()=>_(0,s),style:{fontSize:"13px",fontWeight:500,color:"#3b82f6"},children:t?"Show less":"Show more"})]})},s)})}):(0,r.jsxs)("div",{className:"text-center py-12 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-gray-100 mx-auto mb-4",children:(0,r.jsx)(eV.Z,{style:{fontSize:"24px",color:"#9ca3af"}})}),(0,r.jsx)(sE,{className:"text-gray-600 font-medium",children:"No results found"}),(0,r.jsx)(sE,{className:"text-sm text-gray-500 mt-1",children:"Try a different search query"})]})]}),h.length>1&&(0,r.jsxs)("div",{className:"mt-8 pt-6 border-t border-gray-200",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)(sE,{className:"text-sm font-semibold text-gray-700",children:"Previous Searches"}),(0,r.jsx)(se.ZP,{onClick:()=>{p([]),f({}),W.Z.success("Search history cleared")},size:"small",type:"link",style:{fontSize:"13px",fontWeight:500},children:"Clear All"})]}),(0,r.jsx)("div",{className:"space-y-2",children:h.slice(1,6).map((e,s)=>{var t,l,a,n;return(0,r.jsxs)("div",{className:"p-3 bg-gray-50 border border-gray-200 rounded-lg cursor-pointer transition-all duration-200 hover:bg-gray-100 hover:border-gray-300",onClick:()=>{m(e.query)},children:[(0,r.jsx)("div",{className:"text-sm font-medium text-gray-800 truncate",children:e.query}),(0,r.jsxs)("div",{className:"text-xs text-gray-500 mt-1.5 flex items-center gap-2",children:[(0,r.jsxs)("span",{className:"font-medium text-blue-600",children:[(null===(l=e.response)||void 0===l?void 0:null===(t=l.results)||void 0===t?void 0:t.length)||0," ",(null===(n=e.response)||void 0===n?void 0:null===(a=n.results)||void 0===a?void 0:a.length)===1?"result":"results"]}),void 0!==e.latency&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{children:"•"}),(0,r.jsxs)("span",{className:"font-medium text-green-600",children:[e.latency,"ms"]})]}),(0,r.jsx)("span",{children:"•"}),(0,r.jsx)("span",{children:v(e.timestamp)})]})]},s+1)})})]})]}):(0,r.jsxs)("div",{className:"h-full flex flex-col items-center justify-center p-8",children:[(0,r.jsx)("div",{className:"flex items-center justify-center w-24 h-24 rounded-full bg-gray-100 mb-6",children:(0,r.jsx)(eV.Z,{style:{fontSize:"48px",color:"#9ca3af"}})}),(0,r.jsx)(sE,{className:"text-lg text-gray-600 font-medium",children:"Test your search tool"}),(0,r.jsx)(sE,{className:"text-sm text-gray-500 mt-2",children:"Enter a query above to see search results"})]})})]})]})},sR=e=>{var s;let{searchTool:t,onBack:a,isEditing:n,accessToken:i,availableProviders:o}=e,[c,d]=(0,l.useState)({}),m=async(e,s)=>{await (0,sg.vQ)(e)&&(d(e=>({...e,[s]:!0})),setTimeout(()=>{d(e=>({...e,[s]:!1}))},2e3))};return(0,r.jsxs)("div",{className:"p-4 max-w-full",children:[(0,r.jsx)("div",{className:"flex justify-between items-center mb-6",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(F.Z,{icon:sz.Z,variant:"light",className:"mb-4",onClick:a,children:"Back to All Search Tools"}),(0,r.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,r.jsx)(V.Z,{children:t.search_tool_name}),(0,r.jsx)(se.ZP,{type:"text",size:"small",icon:c["search-tool-name"]?(0,r.jsx)(sP.Z,{size:12}):(0,r.jsx)(sA.Z,{size:12}),onClick:()=>m(t.search_tool_name,"search-tool-name"),className:"left-2 z-10 transition-all duration-200 ".concat(c["search-tool-name"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]}),(0,r.jsxs)("div",{className:"flex items-center cursor-pointer",children:[(0,r.jsx)(U.Z,{className:"text-gray-500 font-mono",children:t.search_tool_id}),(0,r.jsx)(se.ZP,{type:"text",size:"small",icon:c["search-tool-id"]?(0,r.jsx)(sP.Z,{size:12}):(0,r.jsx)(sA.Z,{size:12}),onClick:()=>m(t.search_tool_id,"search-tool-id"),className:"left-2 z-10 transition-all duration-200 ".concat(c["search-tool-id"]?"text-green-600 bg-green-50 border-green-200":"text-gray-500 hover:text-gray-700 hover:bg-gray-100")})]})]})}),(0,r.jsxs)(su.Z,{numItems:1,numItemsSm:2,numItemsLg:3,className:"gap-6",children:[(0,r.jsxs)(sd.Z,{children:[(0,r.jsx)(U.Z,{children:"Provider"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(V.Z,{children:(e=>{let s=o.find(s=>s.provider_name===e);return(null==s?void 0:s.ui_friendly_name)||e})(t.litellm_params.search_provider)})})]}),(0,r.jsxs)(sd.Z,{children:[(0,r.jsx)(U.Z,{children:"API Key"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(U.Z,{children:t.litellm_params.api_key?"****":"Not set"})})]}),(0,r.jsxs)(sd.Z,{children:[(0,r.jsx)(U.Z,{children:"Created At"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(U.Z,{children:t.created_at?new Date(t.created_at).toLocaleString():"Unknown"})})]})]}),(null===(s=t.search_tool_info)||void 0===s?void 0:s.description)&&(0,r.jsxs)(sd.Z,{className:"mt-6",children:[(0,r.jsx)(U.Z,{children:"Description"}),(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(U.Z,{children:t.search_tool_info.description})})]}),(0,r.jsx)("div",{className:"mt-6",children:i&&(0,r.jsx)(sF,{searchToolName:t.search_tool_name,accessToken:i})})]})};var sM=t(29),sO=t.n(sM),sB=t(23496),sq=t(35291);let{Text:sU}=e5.default;var sV=e=>{let{litellmParams:s,accessToken:t,onTestComplete:a}=e,[n,i]=(0,l.useState)(!0),[o,c]=(0,l.useState)(null),[d,m]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{i(!0);try{let e=await (0,S.testSearchToolConnection)(t,s);c(e),"success"===e.status&&W.Z.success("Connection test successful!")}catch(e){c({status:"error",message:e instanceof Error?e.message:"Unknown error occurred",error_type:"NetworkError"})}finally{i(!1),a&&a()}})()},[t,s,a]);let u=(null==o?void 0:o.message)?(e=>{if(!e)return"Unknown error";let s=e.split("stack trace:")[0].trim().replace(/^litellm\.(.*?)Error:\s*/,"").replace(/^AuthenticationError:\s*/,"");if(s.includes("")||s.includes("(.*?)<\/title>/);return e?e[1]:s.includes("401")||s.includes("Authorization Required")?"Authentication failed: Invalid API key or credentials":"Authentication error - please check your API key"}return s.length>200?s.substring(0,200)+"...":s})(o.message):"Unknown error";return n?(0,r.jsx)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:(0,r.jsxs)("div",{style:{textAlign:"center",padding:"32px 20px"},className:"jsx-dc9a0e2d897fe63b",children:[(0,r.jsx)("div",{style:{marginBottom:"16px"},className:"jsx-dc9a0e2d897fe63b 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-dc9a0e2d897fe63b"})}),(0,r.jsxs)(sU,{style:{fontSize:"16px"},children:["Testing connection to ",s.search_provider||"search provider","..."]}),(0,r.jsx)(sO(),{id:"dc9a0e2d897fe63b",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)}}"})]})}):o?(0,r.jsxs)("div",{style:{padding:"24px",borderRadius:"8px",backgroundColor:"#fff"},children:["success"===o.status?(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",padding:"32px 20px"},children:[(0,r.jsx)("div",{style:{color:"#52c41a",fontSize:"24px",display:"flex",alignItems:"center"},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)("div",{style:{marginLeft:"12px"},children:[(0,r.jsxs)(sU,{type:"success",style:{fontSize:"18px",fontWeight:500,display:"block"},children:["Connection to ",s.search_provider," successful!"]}),o.test_query&&(0,r.jsxs)(sU,{style:{fontSize:"14px",color:"#666",marginTop:"8px",display:"block"},children:["Test query: ",(0,r.jsx)("code",{style:{backgroundColor:"#f0f0f0",padding:"2px 6px",borderRadius:"4px"},children:o.test_query})]}),void 0!==o.results_count&&(0,r.jsxs)(sU,{style:{fontSize:"14px",color:"#666",display:"block"},children:["Results retrieved: ",o.results_count]})]})]}):(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)(sq.Z,{style:{color:"#ff4d4f",fontSize:"24px",marginRight:"12px"}}),(0,r.jsxs)(sU,{type:"danger",style:{fontSize:"18px",fontWeight:500},children:["Connection to ",s.search_provider||"search provider"," 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.jsxs)(sU,{strong:!0,style:{display:"block",marginBottom:"8px"},children:["Error:"," "]}),(0,r.jsx)(sU,{type:"danger",style:{fontSize:"14px",lineHeight:"1.5"},children:u}),o.error_type&&(0,r.jsx)("div",{style:{marginTop:"8px"},children:(0,r.jsxs)(sU,{style:{fontSize:"13px",color:"#666"},children:["Error type:"," ",(0,r.jsx)("code",{style:{backgroundColor:"#ffebee",padding:"2px 6px",borderRadius:"4px",color:"#d32f2f"},children:o.error_type})]})}),o.message&&(0,r.jsx)("div",{style:{marginTop:"12px"},children:(0,r.jsx)(se.ZP,{type:"link",onClick:()=>m(!d),style:{paddingLeft:0,height:"auto"},children:d?"Hide Details":"Show Details"})})]}),d&&(0,r.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,r.jsx)(sU,{strong:!0,style:{display:"block",marginBottom:"8px",fontSize:"15px"},children:"Full Error 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",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:o.message})]}),(0,r.jsxs)("div",{style:{backgroundColor:"#fffbf0",border:"1px solid #ffe58f",borderLeft:"4px solid #faad14",borderRadius:"8px",padding:"16px"},children:[(0,r.jsx)(sU,{strong:!0,style:{display:"block",marginBottom:"8px",color:"#d48806"},children:"Troubleshooting tips:"}),(0,r.jsxs)("ul",{style:{margin:"8px 0",paddingLeft:"20px",color:"#ad6800"},children:[(0,r.jsx)("li",{style:{marginBottom:"6px"},children:"Verify your API key is correct and active"}),(0,r.jsx)("li",{style:{marginBottom:"6px"},children:"Check if the search provider service is operational"}),(0,r.jsx)("li",{style:{marginBottom:"6px"},children:"Ensure you have sufficient credits/quota with the provider"}),(0,r.jsx)("li",{style:{marginBottom:"6px"},children:"Review the provider's documentation for any additional requirements"})]})]})]})}),(0,r.jsx)(sB.Z,{style:{margin:"24px 0 16px"}}),(0,r.jsx)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:(0,r.jsx)(se.ZP,{type:"link",href:"https://docs.litellm.ai/docs/search",target:"_blank",icon:(0,r.jsx)(ep.Z,{}),children:"View Search Documentation"})})]}):null};let{TextArea:sK}=e7.default,sH=e=>"".concat("/ui/assets/logos/").concat(e,".png"),sW=e=>{let{providerName:s,displayName:t}=e;return(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)(eg.default,{src:sH(s),alt:"",width:20,height:20,style:{marginRight:"8px",objectFit:"contain"},onError:e=>{e.currentTarget.style.display="none"}}),(0,r.jsx)("span",{children:t})]})};var sY=e=>{let{userRole:s,accessToken:t,onCreateSuccess:a,isModalVisible:n,setModalVisible:i}=e,[o]=K.Z.useForm(),[c,d]=(0,l.useState)(!1),[m,u]=(0,l.useState)({}),[x,h]=(0,l.useState)(!1),[p,g]=(0,l.useState)(!1),[f,j]=(0,l.useState)(""),{data:y,isLoading:b}=(0,sk.a)({queryKey:["searchProviders"],queryFn:()=>{if(!t)throw Error("Access Token required");return(0,S.fetchAvailableSearchProviders)(t)},enabled:!!t&&n}),v=(null==y?void 0:y.providers)||[],_=async e=>{d(!0);try{let s={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};if(console.log("Creating search tool with payload:",s),null!=t){let e=await (0,S.createSearchTool)(t,s);W.Z.success("Search tool created successfully"),o.resetFields(),u({}),i(!1),a(e)}}catch(e){W.Z.error("Error creating search tool: "+e)}finally{d(!1)}},Z=async()=>{try{await o.validateFields(["search_provider","api_key"]),g(!0),j("test-".concat(Date.now())),h(!0)}catch(e){W.Z.error("Please fill in Search Provider and API Key before testing")}};return(l.useEffect(()=>{n||u({})},[n]),(0,eX.tY)(s))?(0,r.jsxs)(H.Z,{title:(0,r.jsxs)("div",{className:"flex items-center space-x-3 pb-4 border-b border-gray-100",children:[(0,r.jsx)("span",{className:"text-2xl",children:"\uD83D\uDD0D"}),(0,r.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Add New Search Tool"})]}),open:n,width:800,onCancel:()=>{o.resetFields(),u({}),i(!1)},footer:null,className:"top-8",styles:{body:{padding:"24px"},header:{padding:"24px 24px 0 24px",border:"none"}},children:[(0,r.jsx)("div",{className:"mt-6",children:(0,r.jsxs)(K.Z,{form:o,onFinish:_,onValuesChange:(e,s)=>u(s),layout:"vertical",className:"space-y-6",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-6",children:[(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Tool Name",(0,r.jsx)(ex.Z,{title:"A unique name to identify this search tool configuration (e.g., 'perplexity-search', 'tavily-news-search').",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_tool_name",rules:[{required:!0,message:"Please enter a search tool name"},{pattern:/^[a-zA-Z0-9_-]+$/,message:"Name can only contain letters, numbers, hyphens, and underscores"}],children:(0,r.jsx)(eu.o,{placeholder:"e.g., perplexity-search, my-tavily-tool",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["Search Provider",(0,r.jsx)(ex.Z,{title:"Select the search provider you want to use. Each provider has different capabilities and pricing.",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"search_provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,r.jsx)(eh.default,{placeholder:"Select a search provider",className:"rounded-lg",size:"large",loading:b,showSearch:!0,optionFilterProp:"children",optionLabelProp:"label",children:v.map(e=>(0,r.jsx)(eh.default.Option,{value:e.provider_name,label:(0,r.jsx)(sW,{providerName:e.provider_name,displayName:e.ui_friendly_name}),children:(0,r.jsx)(sW,{providerName:e.provider_name,displayName:e.ui_friendly_name})},e.provider_name))})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center",children:["API Key",(0,r.jsx)(ex.Z,{title:"The API key for authenticating with the search provider. This will be securely stored.",children:(0,r.jsx)(ep.Z,{className:"ml-2 text-blue-400 hover:text-blue-600 cursor-help"})})]}),name:"api_key",rules:[{required:!1,message:"Please enter an API key"}],children:(0,r.jsx)(eu.o,{type:"password",placeholder:"Enter your API key",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})}),(0,r.jsx)(K.Z.Item,{label:(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Description (Optional)"}),name:"description",children:(0,r.jsx)(sK,{rows:3,placeholder:"Brief description of this search tool's purpose",className:"rounded-lg border-gray-300 focus:border-blue-500 focus:ring-blue-500"})})]}),(0,r.jsxs)("div",{className:"flex justify-between items-center pt-6 border-t border-gray-100",children:[(0,r.jsx)(ex.Z,{title:"Get help on our github",children:(0,r.jsx)(e5.default.Link,{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",children:"Need Help?"})}),(0,r.jsxs)("div",{className:"space-x-2",children:[(0,r.jsx)(eu.z,{onClick:Z,loading:p,children:"Test Connection"}),(0,r.jsx)(eu.z,{loading:c,type:"submit",children:"Add Search Tool"})]})]})]})}),(0,r.jsx)(H.Z,{title:"Connection Test Results",open:x,onCancel:()=>{h(!1),g(!1)},footer:[(0,r.jsx)(eu.z,{onClick:()=>{h(!1),g(!1)},children:"Close"},"close")],width:700,children:x&&t&&(0,r.jsx)(sV,{litellmParams:{search_provider:m.search_provider,api_key:m.api_key,api_base:m.api_base},accessToken:t,onTestComplete:()=>g(!1)},f)})]}):null};let sJ=e=>{let{isModalOpen:s,title:t,confirmDelete:l,cancelDelete:a}=e;return s?(0,r.jsx)(H.Z,{open:s,onOk:l,okType:"danger",onCancel:a,children:(0,r.jsxs)(su.Z,{numItems:1,className:"gap-2 w-full",children:[(0,r.jsx)(V.Z,{children:t}),(0,r.jsx)(sm.Z,{numColSpan:1,children:(0,r.jsx)("p",{children:"Are you sure you want to delete this search tool?"})})]})}):null};var sG=e=>{let{accessToken:s,userRole:t,userID:a}=e,{data:n,isLoading:i,refetch:o}=(0,sk.a)({queryKey:["searchTools"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,S.fetchSearchTools)(s).then(e=>e.search_tools||[])},enabled:!!s}),{data:c,isLoading:d}=(0,sk.a)({queryKey:["searchProviders"],queryFn:()=>{if(!s)throw Error("Access Token required");return(0,S.fetchAvailableSearchProviders)(s)},enabled:!!s}),m=(null==c?void 0:c.providers)||[],[u,x]=(0,l.useState)(null),[h,p]=(0,l.useState)(!1),[g,f]=(0,l.useState)(null),[j,y]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[_,Z]=(0,l.useState)(!1),[w]=K.Z.useForm(),N=l.useMemo(()=>sT(e=>{f(e),y(!1)},e=>{let s=null==n?void 0:n.find(s=>s.search_tool_id===e);if(s){var t;w.setFieldsValue({search_tool_name:s.search_tool_name,search_provider:s.litellm_params.search_provider,api_key:s.litellm_params.api_key,api_base:s.litellm_params.api_base,timeout:s.litellm_params.timeout,max_retries:s.litellm_params.max_retries,description:null===(t=s.search_tool_info)||void 0===t?void 0:t.description}),f(e),Z(!0)}},k,m),[m,n,w]);function k(e){x(e),p(!0)}let C=async()=>{if(null!=u&&null!=s){try{await (0,S.deleteSearchTool)(s,u),W.Z.success("Deleted search tool successfully"),o()}catch(e){console.error("Error deleting the search tool:",e),W.Z.error("Failed to delete search tool")}p(!1),x(null)}},T=async()=>{if(s&&g)try{let e=await w.validateFields(),t={search_tool_name:e.search_tool_name,litellm_params:{search_provider:e.search_provider,api_key:e.api_key,api_base:e.api_base,timeout:e.timeout?parseFloat(e.timeout):void 0,max_retries:e.max_retries?parseInt(e.max_retries):void 0},search_tool_info:e.description?{description:e.description}:void 0};await (0,S.updateSearchTool)(s,g,t),W.Z.success("Search tool updated successfully"),Z(!1),w.resetFields(),f(null),o()}catch(e){console.error("Failed to update search tool:",e),W.Z.error("Failed to update search tool")}};return s&&t&&a?(0,r.jsxs)("div",{className:"w-full h-full p-6",children:[(0,r.jsx)(sJ,{isModalOpen:h,title:"Delete Search Tool",confirmDelete:C,cancelDelete:()=>{p(!1),x(null)}}),(0,r.jsx)(sY,{userRole:t,accessToken:s,onCreateSuccess:e=>{v(!1),o()},isModalVisible:b,setModalVisible:v}),(0,r.jsx)(H.Z,{title:"Edit Search Tool",open:_,onOk:T,onCancel:()=>{Z(!1),w.resetFields(),f(null)},width:600,children:(0,r.jsxs)(K.Z,{form:w,layout:"vertical",children:[(0,r.jsx)(K.Z.Item,{name:"search_tool_name",label:"Search Tool Name",rules:[{required:!0,message:"Please enter a search tool name"}],children:(0,r.jsx)(e7.default,{placeholder:"e.g., my-perplexity-search"})}),(0,r.jsx)(K.Z.Item,{name:"search_provider",label:"Search Provider",rules:[{required:!0,message:"Please select a search provider"}],children:(0,r.jsx)(eh.default,{placeholder:"Select a search provider",loading:d,children:m.map(e=>(0,r.jsx)(eh.default.Option,{value:e.provider_name,children:e.ui_friendly_name},e.provider_name))})}),(0,r.jsx)(K.Z.Item,{name:"api_key",label:"API Key",extra:"API key for the search provider",children:(0,r.jsx)(e7.default.Password,{placeholder:"Enter API key"})}),(0,r.jsx)(K.Z.Item,{name:"description",label:"Description",children:(0,r.jsx)(e7.default.TextArea,{rows:3,placeholder:"Description of this search tool"})})]})}),(0,r.jsx)(V.Z,{children:"Search Tools"}),(0,r.jsx)(U.Z,{className:"text-tremor-content mt-2",children:"Configure and manage your search providers"}),(0,eX.tY)(t)&&(0,r.jsx)(F.Z,{className:"mt-4 mb-4",onClick:()=>v(!0),children:"+ Add New Search Tool"}),(0,r.jsx)(()=>g?(0,r.jsx)(sR,{searchTool:(null==n?void 0:n.find(e=>e.search_tool_id===g))||{search_tool_id:"",search_tool_name:"",litellm_params:{search_provider:""}},onBack:()=>{y(!1),f(null),o()},isEditing:j,accessToken:s,availableProviders:m}):(0,r.jsx)("div",{className:"w-full h-full",children:(0,r.jsx)("div",{className:"w-full px-6 mt-6",children:(0,r.jsx)(sS.w,{data:n||[],columns:N,renderSubComponent:()=>(0,r.jsx)("div",{}),getRowCanExpand:()=>!1,isLoading:i,noDataMessage:"No search tools configured"})})}),{})]}):(console.log("Missing required authentication parameters",{accessToken:s,userRole:t,userID:a}),(0,r.jsx)("div",{className:"p-6 text-center text-gray-500",children:"Missing required authentication parameters."}))};function sX(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";document.cookie="".concat(e,"=; Max-Age=0; Path=").concat(s)}function s$(e){try{let s=(0,n.o)(e);if(s&&"number"==typeof s.exp)return 1e3*s.exp<=Date.now();return!1}catch(e){return!0}}let sQ=new i.S;function s0(){return(0,r.jsxs)("div",{className:(0,eC.cx)("h-screen","flex items-center justify-center gap-4"),children:[(0,r.jsx)("div",{className:"text-lg font-medium py-2 pr-4 border-r border-r-gray-200",children:"\uD83D\uDE85 LiteLLM"}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)(eS.S,{className:"size-4"}),(0,r.jsx)("span",{className:"text-gray-600 text-sm",children:"Loading..."})]})]})}function s1(){let[e,s]=(0,l.useState)(""),[t,i]=(0,l.useState)(!1),[F,R]=(0,l.useState)(!1),[M,O]=(0,l.useState)(null),[B,q]=(0,l.useState)(null),[U,V]=(0,l.useState)([]),[K,H]=(0,l.useState)([]),[W,Y]=(0,l.useState)([]),[J,G]=(0,l.useState)({PROXY_BASE_URL:"",PROXY_LOGOUT_URL:""}),[X,$]=(0,l.useState)(!0),Q=(0,a.useSearchParams)(),[ee,es]=(0,l.useState)({data:[]}),[et,er]=(0,l.useState)(null),[el,ea]=(0,l.useState)(!1),[en,ei]=(0,l.useState)(!0),[eo,ec]=(0,l.useState)(null),{refactoredUIFlag:ed}=(0,eT.Z)(),em=Q.get("invitation_id"),[eu,ex]=(0,l.useState)(()=>Q.get("page")||"api-keys"),[eh,ep]=(0,l.useState)(null),[eg,ef]=(0,l.useState)(!1),ej=e=>{V(s=>s?[...s,e]:[e]),ea(()=>!el)},ey=!1===en&&null===et&&null===em;return((0,l.useEffect)(()=>{let e=!1;return(async()=>{try{await (0,S.getUiConfig)()}catch(e){}if(e)return;let s=function(e){let s=document.cookie.split("; ").find(s=>s.startsWith(e+"="));if(!s)return null;let t=s.slice(e.length+1);try{return decodeURIComponent(t)}catch(e){return t}}("token"),t=s&&!s$(s)?s:null;s&&!t&&sX("token","/"),e||(er(t),ei(!1))})(),()=>{e=!0}},[]),(0,l.useEffect)(()=>{if(ey){let e=(S.proxyBaseUrl||"")+"/sso/key/generate";window.location.replace(e)}},[ey]),(0,l.useEffect)(()=>{if(!et)return;if(s$(et)){sX("token","/"),er(null);return}let e=null;try{e=(0,n.o)(et)}catch(e){sX("token","/"),er(null);return}if(e){if(ep(e.key),R(e.disabled_non_admin_personal_key_creation),e.user_role){let t=function(e){if(!e)return"Undefined Role";switch(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_user_viewer":case"internal_viewer":return"Internal Viewer";case"app_user":return"App User";default:return"Unknown Role"}}(e.user_role);s(t),"Admin Viewer"==t&&ex("usage")}e.user_email&&O(e.user_email),e.login_method&&$("username_password"==e.login_method),e.premium_user&&i(e.premium_user),e.auth_header_name&&(0,S.setGlobalLitellmHeaderName)(e.auth_header_name),e.user_id&&ec(e.user_id)}},[et]),(0,l.useEffect)(()=>{eh&&eo&&e&&(0,P.Nr)(eo,e,eh,Y),eh&&eo&&e&&(0,A.Z)(eh,eo,e,null,q),eh&&(0,h.g)(eh,H)},[eh,eo,e]),en||ey)?(0,r.jsx)(s0,{}):(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(s0,{}),children:(0,r.jsx)(o.aH,{client:sQ,children:(0,r.jsx)(d.f,{accessToken:eh,children:em?(0,r.jsx)(m.Z,{userID:eo,userRole:e,premiumUser:t,teams:B,keys:U,setUserRole:s,userEmail:M,setUserEmail:O,setTeams:q,setKeys:V,organizations:K,addKey:ej,createClicked:el}):(0,r.jsxs)("div",{className:"flex flex-col min-h-screen",children:[(0,r.jsx)(c.Z,{userID:eo,userRole:e,premiumUser:t,userEmail:M,setProxySettings:G,proxySettings:J,accessToken:eh,isPublicPage:!1,sidebarCollapsed:eg,onToggleSidebar:()=>{ef(!eg)}}),(0,r.jsxs)("div",{className:"flex flex-1 overflow-auto",children:[(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(e6,{setPage:e=>{let s=new URLSearchParams(Q);s.set("page",e),window.history.pushState(null,"","?".concat(s.toString())),ex(e)},defaultSelectedKey:eu,sidebarCollapsed:eg})}),"api-keys"==eu?(0,r.jsx)(m.Z,{userID:eo,userRole:e,premiumUser:t,teams:B,keys:U,setUserRole:s,userEmail:M,setUserEmail:O,setTeams:q,setKeys:V,organizations:K,addKey:ej,createClicked:el}):"models"==eu?(0,r.jsx)(u.Z,{userID:eo,userRole:e,token:et,keys:U,accessToken:eh,modelData:ee,setModelData:es,premiumUser:t,teams:B}):"llm-playground"==eu?(0,r.jsx)(w.Z,{userID:eo,userRole:e,token:et,accessToken:eh,disabledPersonalKeyCreation:F}):"users"==eu?(0,r.jsx)(x.Z,{userID:eo,userRole:e,token:et,keys:U,teams:B,accessToken:eh,setKeys:V}):"teams"==eu?(0,r.jsx)(sN,{teams:B,setTeams:q,accessToken:eh,userID:eo,userRole:e,organizations:K,premiumUser:t,searchParams:Q}):"organizations"==eu?(0,r.jsx)(h.Z,{organizations:K,setOrganizations:H,userModels:W,accessToken:eh,userRole:e,premiumUser:t}):"admin-panel"==eu?(0,r.jsx)(p.Z,{setTeams:q,searchParams:Q,accessToken:eh,userID:eo,showSSOBanner:X,premiumUser:t,proxySettings:J}):"api_ref"==eu?(0,r.jsx)(Z.Z,{proxySettings:J}):"settings"==eu?(0,r.jsx)(g.Z,{userID:eo,userRole:e,accessToken:eh,premiumUser:t}):"budgets"==eu?(0,r.jsx)(y.Z,{accessToken:eh}):"guardrails"==eu?(0,r.jsx)(C.Z,{accessToken:eh,userRole:e}):"prompts"==eu?(0,r.jsx)(T.Z,{accessToken:eh,userRole:e}):"transform-request"==eu?(0,r.jsx)(z.Z,{accessToken:eh}):"general-settings"==eu?(0,r.jsx)(f.Z,{userID:eo,userRole:e,accessToken:eh,modelData:ee}):"ui-theme"==eu?(0,r.jsx)(E.Z,{userID:eo,userRole:e,accessToken:eh}):"cost-tracking-settings"==eu?(0,r.jsx)(ek,{userID:eo,userRole:e,accessToken:eh}):"model-hub-table"==eu?(0,r.jsx)(v.Z,{accessToken:eh,publicPage:!1,premiumUser:t,userRole:e}):"caching"==eu?(0,r.jsx)(k.Z,{userID:eo,userRole:e,token:et,accessToken:eh,premiumUser:t}):"pass-through-settings"==eu?(0,r.jsx)(j.Z,{userID:eo,userRole:e,accessToken:eh,modelData:ee,premiumUser:t}):"logs"==eu?(0,r.jsx)(b.Z,{userID:eo,userRole:e,token:et,accessToken:eh,allTeams:null!=B?B:[],premiumUser:t}):"mcp-servers"==eu?(0,r.jsx)(D.d,{accessToken:eh,userRole:e,userID:eo}):"search-tools"==eu?(0,r.jsx)(sG,{accessToken:eh,userRole:e,userID:eo}):"tag-management"==eu?(0,r.jsx)(I.Z,{accessToken:eh,userRole:e,userID:eo}):"vector-stores"==eu?(0,r.jsx)(L.Z,{accessToken:eh,userRole:e,userID:eo}):"new_usage"==eu?(0,r.jsx)(_.Z,{userID:eo,userRole:e,accessToken:eh,teams:null!=B?B:[],premiumUser:t}):(0,r.jsx)(N.Z,{userID:eo,userRole:e,token:et,accessToken:eh,keys:U,premiumUser:t})]})]})})})})}},88904:function(e,s,t){"use strict";var r=t(57437),l=t(2265),a=t(88913),n=t(93192),i=t(52787),o=t(63709),c=t(87908),d=t(19250),m=t(65925),u=t(46468),x=t(9114);s.Z=e=>{var s;let{accessToken:t,userID:h,userRole:p}=e,[g,f]=(0,l.useState)(!0),[j,y]=(0,l.useState)(null),[b,v]=(0,l.useState)(!1),[_,Z]=(0,l.useState)({}),[w,N]=(0,l.useState)(!1),[k,S]=(0,l.useState)([]),{Paragraph:C}=n.default,{Option:T}=i.default;(0,l.useEffect)(()=>{(async()=>{if(!t){f(!1);return}try{let e=await (0,d.getDefaultTeamSettings)(t);if(y(e),Z(e.values||{}),t)try{let e=await (0,d.modelAvailableCall)(t,h,p);if(e&&e.data){let s=e.data.map(e=>e.id);S(s)}}catch(e){console.error("Error fetching available models:",e)}}catch(e){console.error("Error fetching team SSO settings:",e),x.Z.fromBackend("Failed to fetch team settings")}finally{f(!1)}})()},[t]);let z=async()=>{if(t){N(!0);try{let e=await (0,d.updateDefaultTeamSettings)(t,_);y({...j,values:e.settings}),v(!1),x.Z.success("Default team settings updated successfully")}catch(e){console.error("Error updating team settings:",e),x.Z.fromBackend("Failed to update team settings")}finally{N(!1)}}},P=(e,s)=>{Z(t=>({...t,[e]:s}))},A=(e,s,t)=>{var l;let n=s.type;return"budget_duration"===e?(0,r.jsx)(m.Z,{value:_[e]||null,onChange:s=>P(e,s),className:"mt-2"}):"boolean"===n?(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(o.Z,{checked:!!_[e],onChange:s=>P(e,s)})}):"array"===n&&(null===(l=s.items)||void 0===l?void 0:l.enum)?(0,r.jsx)(i.default,{mode:"multiple",style:{width:"100%"},value:_[e]||[],onChange:s=>P(e,s),className:"mt-2",children:s.items.enum.map(e=>(0,r.jsx)(T,{value:e,children:e},e))}):"models"===e?(0,r.jsx)(i.default,{mode:"multiple",style:{width:"100%"},value:_[e]||[],onChange:s=>P(e,s),className:"mt-2",children:k.map(e=>(0,r.jsx)(T,{value:e,children:(0,u.W0)(e)},e))}):"string"===n&&s.enum?(0,r.jsx)(i.default,{style:{width:"100%"},value:_[e]||"",onChange:s=>P(e,s),className:"mt-2",children:s.enum.map(e=>(0,r.jsx)(T,{value:e,children:e},e))}):(0,r.jsx)(a.oi,{value:void 0!==_[e]?String(_[e]):"",onChange:s=>P(e,s.target.value),placeholder:s.description||"",className:"mt-2"})},D=(e,s)=>null==s?(0,r.jsx)("span",{className:"text-gray-400",children:"Not set"}):"budget_duration"===e?(0,r.jsx)("span",{children:(0,m.m)(s)}):"boolean"==typeof s?(0,r.jsx)("span",{children:s?"Enabled":"Disabled"}):"models"===e&&Array.isArray(s)?0===s.length?(0,r.jsx)("span",{className:"text-gray-400",children:"None"}):(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,r.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:(0,u.W0)(e)},s))}):"object"==typeof s?Array.isArray(s)?0===s.length?(0,r.jsx)("span",{className:"text-gray-400",children:"None"}):(0,r.jsx)("div",{className:"flex flex-wrap gap-2 mt-1",children:s.map((e,s)=>(0,r.jsx)("span",{className:"px-2 py-1 bg-blue-100 rounded text-xs",children:"object"==typeof e?JSON.stringify(e):String(e)},s))}):(0,r.jsx)("pre",{className:"bg-gray-100 p-2 rounded text-xs overflow-auto mt-1",children:JSON.stringify(s,null,2)}):(0,r.jsx)("span",{children:String(s)});return g?(0,r.jsx)("div",{className:"flex justify-center items-center h-64",children:(0,r.jsx)(c.Z,{size:"large"})}):j?(0,r.jsxs)(a.Zb,{children:[(0,r.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,r.jsx)(a.Dx,{className:"text-xl",children:"Default Team Settings"}),!g&&j&&(b?(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(a.zx,{variant:"secondary",onClick:()=>{v(!1),Z(j.values||{})},disabled:w,children:"Cancel"}),(0,r.jsx)(a.zx,{onClick:z,loading:w,children:"Save Changes"})]}):(0,r.jsx)(a.zx,{onClick:()=>v(!0),children:"Edit Settings"}))]}),(0,r.jsx)(a.xv,{children:"These settings will be applied by default when creating new teams."}),(null==j?void 0:null===(s=j.field_schema)||void 0===s?void 0:s.description)&&(0,r.jsx)(C,{className:"mb-4 mt-2",children:j.field_schema.description}),(0,r.jsx)(a.iz,{}),(0,r.jsx)("div",{className:"mt-4 space-y-4",children:(()=>{let{values:e,field_schema:s}=j;return s&&s.properties?Object.entries(s.properties).map(s=>{let[t,l]=s,n=e[t],i=t.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)(a.xv,{className:"font-medium text-lg",children:i}),(0,r.jsx)(C,{className:"text-sm text-gray-500 mt-1",children:l.description||"No description available"}),b?(0,r.jsx)("div",{className:"mt-2",children:A(t,l,n)}):(0,r.jsx)("div",{className:"mt-1 p-2 bg-gray-50 rounded",children:D(t,n)})]},t)}):(0,r.jsx)(a.xv,{children:"No schema information available"})})()})]}):(0,r.jsx)(a.Zb,{children:(0,r.jsx)(a.xv,{children:"No team settings available or you do not have permission to view them."})})}},49104:function(e,s,t){"use strict";t.d(s,{Z:function(){return E}});var r=t(57437),l=t(2265),a=t(87452),n=t(88829),i=t(72208),o=t(49566),c=t(13634),d=t(82680),m=t(20577),u=t(52787),x=t(73002),h=t(19250),p=t(9114),g=e=>{let{isModalVisible:s,accessToken:t,setIsModalVisible:l,setBudgetList:g}=e,[f]=c.Z.useForm(),j=async e=>{if(null!=t&&void 0!=t)try{p.Z.info("Making API Call");let s=await (0,h.budgetCreateCall)(t,e);console.log("key create Response:",s),g(e=>e?[...e,s]:[s]),p.Z.success("Budget Created"),f.resetFields()}catch(e){console.error("Error creating the key:",e),p.Z.fromBackend("Error creating the key: ".concat(e))}};return(0,r.jsx)(d.Z,{title:"Create Budget",visible:s,width:800,footer:null,onOk:()=>{l(!1),f.resetFields()},onCancel:()=>{l(!1),f.resetFields()},children:(0,r.jsxs)(c.Z,{form:f,onFinish:j,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.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)(o.Z,{placeholder:""})}),(0,r.jsx)(c.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)(c.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)(a.Z,{className:"mt-20 mb-8",children:[(0,r.jsx)(i.Z,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(n.Z,{children:[(0,r.jsx)(c.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(m.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(c.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(u.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(u.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(u.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(u.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(x.ZP,{htmlType:"submit",children:"Create Budget"})})]})})},f=e=>{let{isModalVisible:s,accessToken:t,setIsModalVisible:g,setBudgetList:f,existingBudget:j,handleUpdateCall:y}=e;console.log("existingBudget",j);let[b]=c.Z.useForm();(0,l.useEffect)(()=>{b.setFieldsValue(j)},[j,b]);let v=async e=>{if(null!=t&&void 0!=t)try{p.Z.info("Making API Call"),g(!0);let s=await (0,h.budgetUpdateCall)(t,e);f(e=>e?[...e,s]:[s]),p.Z.success("Budget Updated"),b.resetFields(),y()}catch(e){console.error("Error creating the key:",e),p.Z.fromBackend("Error creating the key: ".concat(e))}};return(0,r.jsx)(d.Z,{title:"Edit Budget",visible:s,width:800,footer:null,onOk:()=>{g(!1),b.resetFields()},onCancel:()=>{g(!1),b.resetFields()},children:(0,r.jsxs)(c.Z,{form:b,onFinish:v,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:j,children:[(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.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)(o.Z,{placeholder:""})}),(0,r.jsx)(c.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)(c.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)(a.Z,{className:"mt-20 mb-8",children:[(0,r.jsx)(i.Z,{children:(0,r.jsx)("b",{children:"Optional Settings"})}),(0,r.jsxs)(n.Z,{children:[(0,r.jsx)(c.Z.Item,{label:"Max Budget (USD)",name:"max_budget",children:(0,r.jsx)(m.Z,{step:.01,precision:2,width:200})}),(0,r.jsx)(c.Z.Item,{className:"mt-8",label:"Reset Budget",name:"budget_duration",children:(0,r.jsxs)(u.default,{defaultValue:null,placeholder:"n/a",children:[(0,r.jsx)(u.default.Option,{value:"24h",children:"daily"}),(0,r.jsx)(u.default.Option,{value:"7d",children:"weekly"}),(0,r.jsx)(u.default.Option,{value:"30d",children:"monthly"})]})})]})]})]}),(0,r.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,r.jsx)(x.ZP,{htmlType:"submit",children:"Save"})})]})})},j=t(20831),y=t(12514),b=t(47323),v=t(12485),_=t(18135),Z=t(35242),w=t(29706),N=t(77991),k=t(21626),S=t(97214),C=t(28241),T=t(58834),z=t(69552),P=t(71876),A=t(84264),D=t(53410),I=t(74998),L=t(17906),E=e=>{let{accessToken:s}=e,[t,a]=(0,l.useState)(!1),[n,i]=(0,l.useState)(!1),[o,c]=(0,l.useState)(null),[d,m]=(0,l.useState)([]);(0,l.useEffect)(()=>{s&&(0,h.getBudgetList)(s).then(e=>{m(e)})},[s]);let u=async(e,t)=>{console.log("budget_id",e),null!=s&&(c(d.find(s=>s.budget_id===e)||null),i(!0))},x=async(e,t)=>{if(null==s)return;p.Z.info("Request made"),await (0,h.budgetDeleteCall)(s,e);let r=[...d];r.splice(t,1),m(r),p.Z.success("Budget Deleted.")},E=async()=>{null!=s&&(0,h.getBudgetList)(s).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)(j.Z,{size:"sm",variant:"primary",className:"mb-2",onClick:()=>a(!0),children:"+ Create Budget"}),(0,r.jsx)(g,{accessToken:s,isModalVisible:t,setIsModalVisible:a,setBudgetList:m}),o&&(0,r.jsx)(f,{accessToken:s,isModalVisible:n,setIsModalVisible:i,setBudgetList:m,existingBudget:o,handleUpdateCall:E}),(0,r.jsxs)(y.Z,{children:[(0,r.jsx)(A.Z,{children:"Create a budget to assign to customers."}),(0,r.jsxs)(k.Z,{children:[(0,r.jsx)(T.Z,{children:(0,r.jsxs)(P.Z,{children:[(0,r.jsx)(z.Z,{children:"Budget ID"}),(0,r.jsx)(z.Z,{children:"Max Budget"}),(0,r.jsx)(z.Z,{children:"TPM"}),(0,r.jsx)(z.Z,{children:"RPM"})]})}),(0,r.jsx)(S.Z,{children:d.slice().sort((e,s)=>new Date(s.updated_at).getTime()-new Date(e.updated_at).getTime()).map((e,s)=>(0,r.jsxs)(P.Z,{children:[(0,r.jsx)(C.Z,{children:e.budget_id}),(0,r.jsx)(C.Z,{children:e.max_budget?e.max_budget:"n/a"}),(0,r.jsx)(C.Z,{children:e.tpm_limit?e.tpm_limit:"n/a"}),(0,r.jsx)(C.Z,{children:e.rpm_limit?e.rpm_limit:"n/a"}),(0,r.jsx)(b.Z,{icon:D.Z,size:"sm",onClick:()=>u(e.budget_id,s)}),(0,r.jsx)(b.Z,{icon:I.Z,size:"sm",onClick:()=>x(e.budget_id,s)})]},s))})]})]}),(0,r.jsxs)("div",{className:"mt-5",children:[(0,r.jsx)(A.Z,{className:"text-base",children:"How to use budget id"}),(0,r.jsxs)(_.Z,{children:[(0,r.jsxs)(Z.Z,{children:[(0,r.jsx)(v.Z,{children:"Assign Budget to Customer"}),(0,r.jsx)(v.Z,{children:"Test it (Curl)"}),(0,r.jsx)(v.Z,{children:"Test it (OpenAI SDK)"})]}),(0,r.jsxs)(N.Z,{children:[(0,r.jsx)(w.Z,{children:(0,r.jsx)(L.Z,{language:"bash",children:"\ncurl -X POST --location '/end_user/new' \n-H 'Authorization: Bearer ' \n-H 'Content-Type: application/json' \n-d '{\"user_id\": \"my-customer-id', \"budget_id\": \"\"}' # \uD83D\uDC48 KEY CHANGE\n\n "})}),(0,r.jsx)(w.Z,{children:(0,r.jsx)(L.Z,{language:"bash",children:'\ncurl -X POST --location \'/chat/completions\' \n-H \'Authorization: Bearer \' \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)(w.Z,{children:(0,r.jsx)(L.Z,{language:"python",children:'from openai import OpenAI\nclient = OpenAI(\n base_url="",\n api_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)'})})]})]})]})]})}},918:function(e,s,t){"use strict";var r=t(57437),l=t(2265),a=t(62490),n=t(19250),i=t(9114);s.Z=e=>{let{accessToken:s,userID:t}=e,[o,c]=(0,l.useState)([]);(0,l.useEffect)(()=>{(async()=>{if(s&&t)try{let e=await (0,n.availableTeamListCall)(s);c(e)}catch(e){console.error("Error fetching available teams:",e)}})()},[s,t]);let d=async e=>{if(s&&t)try{await (0,n.teamMemberAddCall)(s,e,{user_id:t,role:"user"}),i.Z.success("Successfully joined team"),c(s=>s.filter(s=>s.team_id!==e))}catch(e){console.error("Error joining team:",e),i.Z.fromBackend("Failed to join team")}};return(0,r.jsx)(a.Zb,{className:"w-full mx-auto flex-auto overflow-y-auto max-h-[50vh]",children:(0,r.jsxs)(a.iA,{children:[(0,r.jsx)(a.ss,{children:(0,r.jsxs)(a.SC,{children:[(0,r.jsx)(a.xs,{children:"Team Name"}),(0,r.jsx)(a.xs,{children:"Description"}),(0,r.jsx)(a.xs,{children:"Members"}),(0,r.jsx)(a.xs,{children:"Models"}),(0,r.jsx)(a.xs,{children:"Actions"})]})}),(0,r.jsxs)(a.RM,{children:[o.map(e=>(0,r.jsxs)(a.SC,{children:[(0,r.jsx)(a.pj,{children:(0,r.jsx)(a.xv,{children:e.team_alias})}),(0,r.jsx)(a.pj,{children:(0,r.jsx)(a.xv,{children:e.description||"No description available"})}),(0,r.jsx)(a.pj,{children:(0,r.jsxs)(a.xv,{children:[e.members_with_roles.length," members"]})}),(0,r.jsx)(a.pj,{children:(0,r.jsx)("div",{className:"flex flex-col",children:e.models&&0!==e.models.length?e.models.map((e,s)=>(0,r.jsx)(a.Ct,{size:"xs",className:"mb-1",color:"blue",children:(0,r.jsx)(a.xv,{children:e.length>30?"".concat(e.slice(0,30),"..."):e})},s)):(0,r.jsx)(a.Ct,{size:"xs",color:"red",children:(0,r.jsx)(a.xv,{children:"All Proxy Models"})})})}),(0,r.jsx)(a.pj,{children:(0,r.jsx)(a.zx,{size:"xs",variant:"secondary",onClick:()=>d(e.team_id),children:"Join Team"})})]},e.team_id)),0===o.length&&(0,r.jsx)(a.SC,{children:(0,r.jsx)(a.pj,{colSpan:5,className:"text-center",children:(0,r.jsx)(a.xv,{children:"No available teams to join"})})})]})]})})}},6674:function(e,s,t){"use strict";t.d(s,{Z:function(){return d}});var r=t(57437),l=t(2265),a=t(73002),n=t(23639),i=t(96761),o=t(19250),c=t(9114),d=e=>{let{accessToken:s}=e,[t,d]=(0,l.useState)('{\n "model": "openai/gpt-4o",\n "messages": [\n {\n "role": "system",\n "content": "You are a helpful assistant."\n },\n {\n "role": "user",\n "content": "Explain quantum computing in simple terms"\n }\n ],\n "temperature": 0.7,\n "max_tokens": 500,\n "stream": true\n}'),[m,u]=(0,l.useState)(""),[x,h]=(0,l.useState)(!1),p=(e,s,t)=>{let r=JSON.stringify(s,null,2).split("\n").map(e=>" ".concat(e)).join("\n"),l=Object.entries(t).map(e=>{let[s,t]=e;return"-H '".concat(s,": ").concat(t,"'")}).join(" \\\n ");return"curl -X POST \\\n ".concat(e," \\\n ").concat(l?"".concat(l," \\\n "):"","-H 'Content-Type: application/json' \\\n -d '{\n").concat(r,"\n }'")},g=async()=>{h(!0);try{let e;try{e=JSON.parse(t)}catch(e){c.Z.fromBackend("Invalid JSON in request body"),h(!1);return}let r={call_type:"completion",request_body:e};if(!s){c.Z.fromBackend("No access token found"),h(!1);return}let l=await (0,o.transformRequestCall)(s,r);if(l.raw_request_api_base&&l.raw_request_body){let e=p(l.raw_request_api_base,l.raw_request_body,l.raw_request_headers||{});u(e),c.Z.success("Request transformed successfully")}else{let e="string"==typeof l?l:JSON.stringify(l);u(e),c.Z.info("Transformed request received in unexpected format")}}catch(e){console.error("Error transforming request:",e),c.Z.fromBackend("Failed to transform request")}finally{h(!1)}};return(0,r.jsxs)("div",{className:"w-full m-2",style:{overflow:"hidden"},children:[(0,r.jsx)(i.Z,{children:"Playground"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:"See how LiteLLM transforms your request for the specified provider."}),(0,r.jsxs)("div",{style:{display:"flex",gap:"16px",width:"100%",minWidth:0,overflow:"hidden"},className:"mt-4",children:[(0,r.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"600px",minWidth:0},children:[(0,r.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,r.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Original Request"}),(0,r.jsx)("p",{style:{color:"#666",margin:0},children:"The request you would send to LiteLLM /chat/completions endpoint."})]}),(0,r.jsx)("textarea",{style:{flex:"1 1 auto",width:"100%",minHeight:"240px",padding:"16px",border:"1px solid #e8e8e8",borderRadius:"6px",fontFamily:"monospace",fontSize:"14px",resize:"none",marginBottom:"24px",overflow:"auto"},value:t,onChange:e=>d(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&"Enter"===e.key&&(e.preventDefault(),g())},placeholder:"Press Cmd/Ctrl + Enter to transform"}),(0,r.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"auto"},children:(0,r.jsxs)(a.ZP,{type:"primary",style:{backgroundColor:"#000",display:"flex",alignItems:"center",gap:"8px"},onClick:g,loading:x,children:[(0,r.jsx)("span",{children:"Transform"}),(0,r.jsx)("span",{children:"→"})]})})]}),(0,r.jsxs)("div",{style:{flex:"1 1 50%",display:"flex",flexDirection:"column",border:"1px solid #e8e8e8",borderRadius:"8px",padding:"24px",overflow:"hidden",maxHeight:"800px",minWidth:0},children:[(0,r.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,r.jsx)("h2",{style:{fontSize:"24px",fontWeight:"bold",margin:"0 0 4px 0"},children:"Transformed Request"}),(0,r.jsx)("p",{style:{color:"#666",margin:0},children:"How LiteLLM transforms your request for the specified provider."}),(0,r.jsx)("br",{}),(0,r.jsx)("p",{style:{color:"#666",margin:0},className:"text-xs",children:"Note: Sensitive headers are not shown."})]}),(0,r.jsxs)("div",{style:{position:"relative",backgroundColor:"#f5f5f5",borderRadius:"6px",flex:"1 1 auto",display:"flex",flexDirection:"column",overflow:"hidden"},children:[(0,r.jsx)("pre",{style:{padding:"16px",fontFamily:"monospace",fontSize:"14px",margin:0,overflow:"auto",flex:"1 1 auto"},children:m||'curl -X POST \\\n https://api.openai.com/v1/chat/completions \\\n -H \'Authorization: Bearer sk-xxx\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "model": "gpt-4",\n "messages": [\n {\n "role": "system",\n "content": "You are a helpful assistant."\n }\n ],\n "temperature": 0.7\n }\''}),(0,r.jsx)(a.ZP,{type:"text",icon:(0,r.jsx)(n.Z,{}),style:{position:"absolute",right:"8px",top:"8px"},size:"small",onClick:()=>{navigator.clipboard.writeText(m||""),c.Z.success("Copied to clipboard")}})]})]})]}),(0,r.jsx)("div",{className:"mt-4 text-right w-full",children:(0,r.jsxs)("p",{className:"text-sm text-gray-500",children:["Found an error? File an issue"," ",(0,r.jsx)("a",{href:"https://github.com/BerriAI/litellm/issues",target:"_blank",rel:"noopener noreferrer",children:"here"}),"."]})})]})}},5183:function(e,s,t){"use strict";var r=t(57437),l=t(2265),a=t(19046),n=t(69734),i=t(19250),o=t(9114);s.Z=e=>{let{userID:s,userRole:t,accessToken:c}=e,{logoUrl:d,setLogoUrl:m}=(0,n.F)(),[u,x]=(0,l.useState)(""),[h,p]=(0,l.useState)(!1);(0,l.useEffect)(()=>{c&&g()},[c]);let g=async()=>{try{let s=(0,i.getProxyBaseUrl)(),t=await fetch(s?"".concat(s,"/get/ui_theme_settings"):"/get/ui_theme_settings",{method:"GET",headers:{Authorization:"Bearer ".concat(c),"Content-Type":"application/json"}});if(t.ok){var e;let s=await t.json(),r=(null===(e=s.values)||void 0===e?void 0:e.logo_url)||"";x(r),m(r||null)}}catch(e){console.error("Error fetching theme settings:",e)}},f=async()=>{p(!0);try{let e=(0,i.getProxyBaseUrl)();if((await fetch(e?"".concat(e,"/update/ui_theme_settings"):"/update/ui_theme_settings",{method:"PATCH",headers:{Authorization:"Bearer ".concat(c),"Content-Type":"application/json"},body:JSON.stringify({logo_url:u||null})})).ok)o.Z.success("Logo settings updated successfully!"),m(u||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating logo settings:",e),o.Z.fromBackend("Failed to update logo settings")}finally{p(!1)}},j=async()=>{x(""),m(null),p(!0);try{let e=(0,i.getProxyBaseUrl)();if((await fetch(e?"".concat(e,"/update/ui_theme_settings"):"/update/ui_theme_settings",{method:"PATCH",headers:{Authorization:"Bearer ".concat(c),"Content-Type":"application/json"},body:JSON.stringify({logo_url:null})})).ok)o.Z.success("Logo reset to default!");else throw Error("Failed to reset logo")}catch(e){console.error("Error resetting logo:",e),o.Z.fromBackend("Failed to reset logo")}finally{p(!1)}};return c?(0,r.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsx)(a.Dx,{className:"text-2xl font-bold mb-2",children:"Logo Customization"}),(0,r.jsx)(a.xv,{className:"text-gray-600",children:"Customize your LiteLLM admin dashboard with a custom logo."})]}),(0,r.jsx)(a.Zb,{className:"shadow-sm p-6",children:(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(a.xv,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Custom Logo URL"}),(0,r.jsx)(a.oi,{placeholder:"https://example.com/logo.png",value:u,onValueChange:e=>{x(e),m(e||null)},className:"w-full"}),(0,r.jsx)(a.xv,{className:"text-xs text-gray-500 mt-1",children:"Enter a URL for your custom logo or leave empty to use the default LiteLLM logo"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(a.xv,{className:"text-sm font-medium text-gray-700 mb-2 block",children:"Current Logo"}),(0,r.jsx)("div",{className:"bg-gray-50 rounded-lg p-6 flex items-center justify-center min-h-[120px]",children:u?(0,r.jsx)("img",{src:u,alt:"Custom logo",className:"max-w-full max-h-24 object-contain",onError:e=>{var s;let t=e.target;t.style.display="none";let r=document.createElement("div");r.className="text-gray-500 text-sm",r.textContent="Failed to load image",null===(s=t.parentElement)||void 0===s||s.appendChild(r)}}):(0,r.jsx)(a.xv,{className:"text-gray-500 text-sm",children:"Default LiteLLM logo will be used"})})]}),(0,r.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,r.jsx)(a.zx,{onClick:f,loading:h,disabled:h,color:"indigo",children:"Save Changes"}),(0,r.jsx)(a.zx,{onClick:j,loading:h,disabled:h,variant:"secondary",color:"gray",children:"Reset to Default"})]})]})})]}):null}}},function(e){e.O(0,[3665,6990,1114,1491,4556,2417,2926,3709,9775,2525,1529,2284,7908,9011,3603,9678,5319,2945,8714,8591,7281,5188,7906,2344,352,9165,1264,1487,7732,169,6433,1160,9888,8448,3250,1223,1162,8049,131,2202,874,4292,2162,2004,2012,8160,1598,2306,3801,4138,4734,3240,7155,6204,1739,773,6925,6600,8143,4289,2273,603,2019,2971,2117,1744],function(){return e(e.s=97731)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/ui/litellm-dashboard/out/_next/static/7uAAvsXigIy3uk94_sJZ2/_buildManifest.js b/ui/litellm-dashboard/out/_next/static/ptN6qp8sxM2Fo-qRqYi8s/_buildManifest.js similarity index 100% rename from ui/litellm-dashboard/out/_next/static/7uAAvsXigIy3uk94_sJZ2/_buildManifest.js rename to ui/litellm-dashboard/out/_next/static/ptN6qp8sxM2Fo-qRqYi8s/_buildManifest.js diff --git a/ui/litellm-dashboard/out/_next/static/7uAAvsXigIy3uk94_sJZ2/_ssgManifest.js b/ui/litellm-dashboard/out/_next/static/ptN6qp8sxM2Fo-qRqYi8s/_ssgManifest.js similarity index 100% rename from ui/litellm-dashboard/out/_next/static/7uAAvsXigIy3uk94_sJZ2/_ssgManifest.js rename to ui/litellm-dashboard/out/_next/static/ptN6qp8sxM2Fo-qRqYi8s/_ssgManifest.js diff --git a/ui/litellm-dashboard/out/api-reference.html b/ui/litellm-dashboard/out/api-reference.html index edd893b9426..af5fd67588c 100644 --- a/ui/litellm-dashboard/out/api-reference.html +++ b/ui/litellm-dashboard/out/api-reference.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/api-reference.txt b/ui/litellm-dashboard/out/api-reference.txt index 95f6db5a517..faf9970bd2f 100644 --- a/ui/litellm-dashboard/out/api-reference.txt +++ b/ui/litellm-dashboard/out/api-reference.txt @@ -2,13 +2,13 @@ 3:I[81300,["1114","static/chunks/1114-744a38eea84cb2ab.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","7906","static/chunks/7906-11071e9e2e7b8318.js","4303","static/chunks/app/(dashboard)/api-reference/page-92bcaf8e0213d44d.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","api-reference","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["api-reference",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","api-reference","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/experimental/api-playground.html b/ui/litellm-dashboard/out/experimental/api-playground.html index c9fb0696ac8..926335a3c8f 100644 --- a/ui/litellm-dashboard/out/experimental/api-playground.html +++ b/ui/litellm-dashboard/out/experimental/api-playground.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/experimental/api-playground.txt b/ui/litellm-dashboard/out/experimental/api-playground.txt index efcf7e73953..c4133609960 100644 --- a/ui/litellm-dashboard/out/experimental/api-playground.txt +++ b/ui/litellm-dashboard/out/experimental/api-playground.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[16643,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3425","static/chunks/app/(dashboard)/experimental/api-playground/page-3b079cf238dc3033.js"],"default",1] +3:I[16643,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3425","static/chunks/app/(dashboard)/experimental/api-playground/page-8a2aa7f525189deb.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","api-playground","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["api-playground",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","api-playground","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/experimental/budgets.html b/ui/litellm-dashboard/out/experimental/budgets.html index 2b18ea8a6ad..561ac8b42c3 100644 --- a/ui/litellm-dashboard/out/experimental/budgets.html +++ b/ui/litellm-dashboard/out/experimental/budgets.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/experimental/budgets.txt b/ui/litellm-dashboard/out/experimental/budgets.txt index 45fa268ed0b..f0f49003d81 100644 --- a/ui/litellm-dashboard/out/experimental/budgets.txt +++ b/ui/litellm-dashboard/out/experimental/budgets.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[78858,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","7906","static/chunks/7906-11071e9e2e7b8318.js","527","static/chunks/527-d9b7316e990a0539.js","8049","static/chunks/8049-b89d8be2044ba775.js","5649","static/chunks/app/(dashboard)/experimental/budgets/page-311e40f543030711.js"],"default",1] +3:I[78858,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","7906","static/chunks/7906-11071e9e2e7b8318.js","527","static/chunks/527-d9b7316e990a0539.js","8049","static/chunks/8049-b89d8be2044ba775.js","5649","static/chunks/app/(dashboard)/experimental/budgets/page-68dbc026f1363c67.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","budgets","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["budgets",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","budgets","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/experimental/caching.html b/ui/litellm-dashboard/out/experimental/caching.html index dcee5076b52..a60047451be 100644 --- a/ui/litellm-dashboard/out/experimental/caching.html +++ b/ui/litellm-dashboard/out/experimental/caching.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/experimental/caching.txt b/ui/litellm-dashboard/out/experimental/caching.txt index d30cecdd012..f9415c773f4 100644 --- a/ui/litellm-dashboard/out/experimental/caching.txt +++ b/ui/litellm-dashboard/out/experimental/caching.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[37492,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","9678","static/chunks/9678-c633432ec1f8c65a.js","8714","static/chunks/8714-9bfbade577ce106c.js","7281","static/chunks/7281-41cef56aa2b3df92.js","2344","static/chunks/2344-169e12738d6439ab.js","1487","static/chunks/1487-ada9ecf7dd9bca97.js","9632","static/chunks/9632-ad2d8db0b3963fa3.js","8049","static/chunks/8049-b89d8be2044ba775.js","6600","static/chunks/6600-aae19ea66859bad4.js","1979","static/chunks/app/(dashboard)/experimental/caching/page-e8380baac59b7a05.js"],"default",1] +3:I[37492,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","9678","static/chunks/9678-c633432ec1f8c65a.js","8714","static/chunks/8714-9bfbade577ce106c.js","7281","static/chunks/7281-41cef56aa2b3df92.js","2344","static/chunks/2344-169e12738d6439ab.js","1487","static/chunks/1487-ada9ecf7dd9bca97.js","9632","static/chunks/9632-ad2d8db0b3963fa3.js","8049","static/chunks/8049-b89d8be2044ba775.js","6600","static/chunks/6600-aae19ea66859bad4.js","1979","static/chunks/app/(dashboard)/experimental/caching/page-ec547623c6ed42f2.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","caching","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["caching",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","caching","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/experimental/old-usage.html b/ui/litellm-dashboard/out/experimental/old-usage.html index ad4c74a8b5e..6bfa87ffae1 100644 --- a/ui/litellm-dashboard/out/experimental/old-usage.html +++ b/ui/litellm-dashboard/out/experimental/old-usage.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/experimental/old-usage.txt b/ui/litellm-dashboard/out/experimental/old-usage.txt index fc95791cb4d..deb0545a9c3 100644 --- a/ui/litellm-dashboard/out/experimental/old-usage.txt +++ b/ui/litellm-dashboard/out/experimental/old-usage.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[42954,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","2344","static/chunks/2344-169e12738d6439ab.js","1487","static/chunks/1487-ada9ecf7dd9bca97.js","7732","static/chunks/7732-beabba2779472f55.js","1160","static/chunks/1160-3efb81c958413447.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-e4210f33d0c47644.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","8143","static/chunks/8143-e53fcdb671edae30.js","813","static/chunks/app/(dashboard)/experimental/old-usage/page-f5a50b82a8a92ba7.js"],"default",1] +3:I[42954,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","2344","static/chunks/2344-169e12738d6439ab.js","1487","static/chunks/1487-ada9ecf7dd9bca97.js","7732","static/chunks/7732-beabba2779472f55.js","1160","static/chunks/1160-3efb81c958413447.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-66e1fb73fd8f2361.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","8143","static/chunks/8143-e53fcdb671edae30.js","813","static/chunks/app/(dashboard)/experimental/old-usage/page-10a35df60ff1635c.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","old-usage","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["old-usage",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","old-usage","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/experimental/prompts.html b/ui/litellm-dashboard/out/experimental/prompts.html index 3d8d7b63bf8..65acb4fbace 100644 --- a/ui/litellm-dashboard/out/experimental/prompts.html +++ b/ui/litellm-dashboard/out/experimental/prompts.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/experimental/prompts.txt b/ui/litellm-dashboard/out/experimental/prompts.txt index 47b8e12b78d..305cb6a0fb1 100644 --- a/ui/litellm-dashboard/out/experimental/prompts.txt +++ b/ui/litellm-dashboard/out/experimental/prompts.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[51599,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","2525","static/chunks/2525-13b137f40949dcf1.js","9011","static/chunks/9011-0769cb78a6e5f233.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","8347","static/chunks/8347-0845abae9a2a5d9e.js","8049","static/chunks/8049-b89d8be2044ba775.js","603","static/chunks/603-22930e1bb988e902.js","2099","static/chunks/app/(dashboard)/experimental/prompts/page-38da9eade6ce2128.js"],"default",1] +3:I[51599,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","2525","static/chunks/2525-13b137f40949dcf1.js","9011","static/chunks/9011-0769cb78a6e5f233.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","8347","static/chunks/8347-0845abae9a2a5d9e.js","8049","static/chunks/8049-b89d8be2044ba775.js","603","static/chunks/603-22930e1bb988e902.js","2099","static/chunks/app/(dashboard)/experimental/prompts/page-aa6e8e445ebb8a78.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","prompts","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["prompts",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","prompts","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/experimental/tag-management.html b/ui/litellm-dashboard/out/experimental/tag-management.html index c772b238ca4..d8faadfa2ed 100644 --- a/ui/litellm-dashboard/out/experimental/tag-management.html +++ b/ui/litellm-dashboard/out/experimental/tag-management.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/experimental/tag-management.txt b/ui/litellm-dashboard/out/experimental/tag-management.txt index 205c2843dcd..acaa3cff883 100644 --- a/ui/litellm-dashboard/out/experimental/tag-management.txt +++ b/ui/litellm-dashboard/out/experimental/tag-management.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[21933,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","2451","static/chunks/2451-51385490540ba4ae.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-e4210f33d0c47644.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","2273","static/chunks/2273-744be17c91f6fa34.js","6061","static/chunks/app/(dashboard)/experimental/tag-management/page-5c90fd436b46801a.js"],"default",1] +3:I[21933,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","2451","static/chunks/2451-51385490540ba4ae.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-66e1fb73fd8f2361.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","2273","static/chunks/2273-744be17c91f6fa34.js","6061","static/chunks/app/(dashboard)/experimental/tag-management/page-75c463f6d2f3343a.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","tag-management","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["experimental",{"children":["tag-management",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children","tag-management","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","experimental","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/guardrails.html b/ui/litellm-dashboard/out/guardrails.html index f2a8b5985c6..922d6a38bb5 100644 --- a/ui/litellm-dashboard/out/guardrails.html +++ b/ui/litellm-dashboard/out/guardrails.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/guardrails.txt b/ui/litellm-dashboard/out/guardrails.txt index f8285f76e8c..dff1519b7ac 100644 --- a/ui/litellm-dashboard/out/guardrails.txt +++ b/ui/litellm-dashboard/out/guardrails.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[49514,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","2945","static/chunks/2945-00442a283770ee5d.js","169","static/chunks/169-07530b6fecd36167.js","5030","static/chunks/5030-d46e46be47c1567d.js","2522","static/chunks/2522-66e1a76ca1d40f57.js","8049","static/chunks/8049-b89d8be2044ba775.js","4734","static/chunks/4734-4afc9b5bc8f3c0c0.js","6607","static/chunks/app/(dashboard)/guardrails/page-d2df3bc5d3bfaa75.js"],"default",1] +3:I[49514,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","2945","static/chunks/2945-00442a283770ee5d.js","169","static/chunks/169-07530b6fecd36167.js","5030","static/chunks/5030-d46e46be47c1567d.js","2522","static/chunks/2522-66e1a76ca1d40f57.js","8049","static/chunks/8049-b89d8be2044ba775.js","4734","static/chunks/4734-4afc9b5bc8f3c0c0.js","6607","static/chunks/app/(dashboard)/guardrails/page-63092ae43b1144df.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","guardrails","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["guardrails",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","guardrails","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/index.html b/ui/litellm-dashboard/out/index.html index 6c0c560106a..d66fda8ea37 100644 --- a/ui/litellm-dashboard/out/index.html +++ b/ui/litellm-dashboard/out/index.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/index.txt b/ui/litellm-dashboard/out/index.txt index a75d21071a9..788c24f836d 100644 --- a/ui/litellm-dashboard/out/index.txt +++ b/ui/litellm-dashboard/out/index.txt @@ -1,8 +1,8 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[17940,["3665","static/chunks/3014691f-702e24806fe9cec4.js","6990","static/chunks/13b76428-e1bf383848c17260.js","1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","7906","static/chunks/7906-11071e9e2e7b8318.js","2344","static/chunks/2344-169e12738d6439ab.js","352","static/chunks/352-522118f2414c0053.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","1264","static/chunks/1264-2979d95e0b56a75c.js","1487","static/chunks/1487-ada9ecf7dd9bca97.js","7732","static/chunks/7732-beabba2779472f55.js","169","static/chunks/169-07530b6fecd36167.js","6433","static/chunks/6433-c9b3a95c5de0b59f.js","1160","static/chunks/1160-3efb81c958413447.js","9888","static/chunks/9888-342228cf692a5e88.js","8448","static/chunks/8448-908a480f98a82d35.js","3250","static/chunks/3250-3256164511237d25.js","1223","static/chunks/1223-de5e7e4f043a5233.js","1162","static/chunks/1162-278deed893787c5d.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-e4210f33d0c47644.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","2162","static/chunks/2162-4d44e2ce99ea2c89.js","2004","static/chunks/2004-84c2eb40e7339274.js","2012","static/chunks/2012-7d504e8114e3c4be.js","8160","static/chunks/8160-08526425824fd908.js","1598","static/chunks/1598-7d5ae4a38946f5f0.js","2306","static/chunks/2306-fe439da67393cf8e.js","3801","static/chunks/3801-1fb81a288323ae68.js","4138","static/chunks/4138-21d3fafa4fdcc45f.js","4734","static/chunks/4734-4afc9b5bc8f3c0c0.js","3240","static/chunks/3240-82b4f5f7b08d1cf1.js","7155","static/chunks/7155-e28a3b7129eff558.js","6204","static/chunks/6204-34043d3e081cf6ca.js","1739","static/chunks/1739-c0af4725a2b1d546.js","773","static/chunks/773-9d5b4a4620697fa3.js","6925","static/chunks/6925-c4d6db49a055b630.js","6600","static/chunks/6600-aae19ea66859bad4.js","8143","static/chunks/8143-e53fcdb671edae30.js","4289","static/chunks/4289-85d72de0c6c33d90.js","2273","static/chunks/2273-744be17c91f6fa34.js","603","static/chunks/603-22930e1bb988e902.js","2019","static/chunks/2019-ecc3e3a4de376109.js","1931","static/chunks/app/page-d6fb0fb010283014.js"],"default",1] +3:I[17940,["3665","static/chunks/3014691f-702e24806fe9cec4.js","6990","static/chunks/13b76428-e1bf383848c17260.js","1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","7906","static/chunks/7906-11071e9e2e7b8318.js","2344","static/chunks/2344-169e12738d6439ab.js","352","static/chunks/352-57ffb92bf8445776.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","1264","static/chunks/1264-2979d95e0b56a75c.js","1487","static/chunks/1487-ada9ecf7dd9bca97.js","7732","static/chunks/7732-beabba2779472f55.js","169","static/chunks/169-07530b6fecd36167.js","6433","static/chunks/6433-c9b3a95c5de0b59f.js","1160","static/chunks/1160-3efb81c958413447.js","9888","static/chunks/9888-342228cf692a5e88.js","8448","static/chunks/8448-908a480f98a82d35.js","3250","static/chunks/3250-3256164511237d25.js","1223","static/chunks/1223-de5e7e4f043a5233.js","1162","static/chunks/1162-278deed893787c5d.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-66e1fb73fd8f2361.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","2162","static/chunks/2162-4d44e2ce99ea2c89.js","2004","static/chunks/2004-84c2eb40e7339274.js","2012","static/chunks/2012-434800e13df9d31b.js","8160","static/chunks/8160-08526425824fd908.js","1598","static/chunks/1598-fd263f5bc605a4ff.js","2306","static/chunks/2306-fe439da67393cf8e.js","3801","static/chunks/3801-1fb81a288323ae68.js","4138","static/chunks/4138-21d3fafa4fdcc45f.js","4734","static/chunks/4734-4afc9b5bc8f3c0c0.js","3240","static/chunks/3240-82b4f5f7b08d1cf1.js","7155","static/chunks/7155-e28a3b7129eff558.js","6204","static/chunks/6204-34043d3e081cf6ca.js","1739","static/chunks/1739-c0af4725a2b1d546.js","773","static/chunks/773-9d5b4a4620697fa3.js","6925","static/chunks/6925-c4d6db49a055b630.js","6600","static/chunks/6600-aae19ea66859bad4.js","8143","static/chunks/8143-e53fcdb671edae30.js","4289","static/chunks/4289-85d72de0c6c33d90.js","2273","static/chunks/2273-744be17c91f6fa34.js","603","static/chunks/603-22930e1bb988e902.js","2019","static/chunks/2019-ecc3e3a4de376109.js","1931","static/chunks/app/page-1e5fd174f829427c.js"],"default",1] 4:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 5:I[4707,[],""] 6:I[36423,[],""] -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",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],["$L7",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",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],["$L7",null]]]] 7:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/logs.html b/ui/litellm-dashboard/out/logs.html index bb6881184bc..331bf2d4bfb 100644 --- a/ui/litellm-dashboard/out/logs.html +++ b/ui/litellm-dashboard/out/logs.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/logs.txt b/ui/litellm-dashboard/out/logs.txt index 6216b063bde..f80af0eb140 100644 --- a/ui/litellm-dashboard/out/logs.txt +++ b/ui/litellm-dashboard/out/logs.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[19056,["6990","static/chunks/13b76428-e1bf383848c17260.js","1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","1264","static/chunks/1264-2979d95e0b56a75c.js","1116","static/chunks/1116-2d5ec30ef7d86f0e.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-e4210f33d0c47644.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","3801","static/chunks/3801-1fb81a288323ae68.js","2100","static/chunks/app/(dashboard)/logs/page-6742dc43acdb7688.js"],"default",1] +3:I[19056,["6990","static/chunks/13b76428-e1bf383848c17260.js","1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","1264","static/chunks/1264-2979d95e0b56a75c.js","1116","static/chunks/1116-2d5ec30ef7d86f0e.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-66e1fb73fd8f2361.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","3801","static/chunks/3801-1fb81a288323ae68.js","2100","static/chunks/app/(dashboard)/logs/page-2b891c389c7bd5fc.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","logs","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["logs",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","logs","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/model-hub.html b/ui/litellm-dashboard/out/model-hub.html index f250c476d6e..ea584bce9f0 100644 --- a/ui/litellm-dashboard/out/model-hub.html +++ b/ui/litellm-dashboard/out/model-hub.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/model-hub.txt b/ui/litellm-dashboard/out/model-hub.txt index 016c6ffee1c..1b6f71f107d 100644 --- a/ui/litellm-dashboard/out/model-hub.txt +++ b/ui/litellm-dashboard/out/model-hub.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[30615,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","7906","static/chunks/7906-11071e9e2e7b8318.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","169","static/chunks/169-07530b6fecd36167.js","8049","static/chunks/8049-b89d8be2044ba775.js","2162","static/chunks/2162-4d44e2ce99ea2c89.js","8160","static/chunks/8160-08526425824fd908.js","2678","static/chunks/app/(dashboard)/model-hub/page-6666e51939068e37.js"],"default",1] +3:I[30615,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","7906","static/chunks/7906-11071e9e2e7b8318.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","169","static/chunks/169-07530b6fecd36167.js","8049","static/chunks/8049-b89d8be2044ba775.js","2162","static/chunks/2162-4d44e2ce99ea2c89.js","8160","static/chunks/8160-08526425824fd908.js","2678","static/chunks/app/(dashboard)/model-hub/page-e19022cda2b01bb4.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","model-hub","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["model-hub",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","model-hub","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/model_hub.html b/ui/litellm-dashboard/out/model_hub.html index 1f89512db31..dde1a399eed 100644 --- a/ui/litellm-dashboard/out/model_hub.html +++ b/ui/litellm-dashboard/out/model_hub.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/model_hub.txt b/ui/litellm-dashboard/out/model_hub.txt index 46ab03de1ff..31ff8a7062b 100644 --- a/ui/litellm-dashboard/out/model_hub.txt +++ b/ui/litellm-dashboard/out/model_hub.txt @@ -1,8 +1,8 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[52829,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8049","static/chunks/8049-b89d8be2044ba775.js","2162","static/chunks/2162-4d44e2ce99ea2c89.js","1418","static/chunks/app/model_hub/page-928f52f4e7f5ee29.js"],"default",1] +3:I[52829,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8049","static/chunks/8049-b89d8be2044ba775.js","2162","static/chunks/2162-4d44e2ce99ea2c89.js","1418","static/chunks/app/model_hub/page-928f52f4e7f5ee29.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] 6:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"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":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L6",null,{"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],["$L7",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"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":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L6",null,{"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],["$L7",null]]]] 7:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/model_hub_table.html b/ui/litellm-dashboard/out/model_hub_table.html index 5cfe60649f2..8dad7e4e5d8 100644 --- a/ui/litellm-dashboard/out/model_hub_table.html +++ b/ui/litellm-dashboard/out/model_hub_table.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/model_hub_table.txt b/ui/litellm-dashboard/out/model_hub_table.txt index ff4a71a6b66..63faa0f1125 100644 --- a/ui/litellm-dashboard/out/model_hub_table.txt +++ b/ui/litellm-dashboard/out/model_hub_table.txt @@ -1,8 +1,8 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[22775,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","7906","static/chunks/7906-11071e9e2e7b8318.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","169","static/chunks/169-07530b6fecd36167.js","8049","static/chunks/8049-b89d8be2044ba775.js","2162","static/chunks/2162-4d44e2ce99ea2c89.js","8160","static/chunks/8160-08526425824fd908.js","9025","static/chunks/app/model_hub_table/page-3aac77a344c012d9.js"],"default",1] +3:I[22775,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","7906","static/chunks/7906-11071e9e2e7b8318.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","169","static/chunks/169-07530b6fecd36167.js","8049","static/chunks/8049-b89d8be2044ba775.js","2162","static/chunks/2162-4d44e2ce99ea2c89.js","8160","static/chunks/8160-08526425824fd908.js","9025","static/chunks/app/model_hub_table/page-3aac77a344c012d9.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] 6:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["model_hub_table",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","model_hub_table","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L6",null,{"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],["$L7",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["model_hub_table",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["model_hub_table",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","model_hub_table","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L6",null,{"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],["$L7",null]]]] 7:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/models-and-endpoints.html b/ui/litellm-dashboard/out/models-and-endpoints.html index 2419ae307b1..d39a120bbb8 100644 --- a/ui/litellm-dashboard/out/models-and-endpoints.html +++ b/ui/litellm-dashboard/out/models-and-endpoints.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/models-and-endpoints.txt b/ui/litellm-dashboard/out/models-and-endpoints.txt index 04de86b74b5..a7aa170d575 100644 --- a/ui/litellm-dashboard/out/models-and-endpoints.txt +++ b/ui/litellm-dashboard/out/models-and-endpoints.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[6121,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","2344","static/chunks/2344-169e12738d6439ab.js","352","static/chunks/352-522118f2414c0053.js","1487","static/chunks/1487-ada9ecf7dd9bca97.js","7732","static/chunks/7732-beabba2779472f55.js","4851","static/chunks/4851-fbdd7aec2937c09d.js","8448","static/chunks/8448-908a480f98a82d35.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-e4210f33d0c47644.js","2012","static/chunks/2012-7d504e8114e3c4be.js","1598","static/chunks/1598-7d5ae4a38946f5f0.js","1664","static/chunks/app/(dashboard)/models-and-endpoints/page-e6682898ea55d333.js"],"default",1] +3:I[6121,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","2344","static/chunks/2344-169e12738d6439ab.js","352","static/chunks/352-57ffb92bf8445776.js","1487","static/chunks/1487-ada9ecf7dd9bca97.js","7732","static/chunks/7732-beabba2779472f55.js","4851","static/chunks/4851-fbdd7aec2937c09d.js","8448","static/chunks/8448-908a480f98a82d35.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-66e1fb73fd8f2361.js","2012","static/chunks/2012-434800e13df9d31b.js","1598","static/chunks/1598-fd263f5bc605a4ff.js","1664","static/chunks/app/(dashboard)/models-and-endpoints/page-797f6bbb69d5f1fc.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","models-and-endpoints","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["models-and-endpoints",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","models-and-endpoints","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/onboarding.html b/ui/litellm-dashboard/out/onboarding.html index 1a3bb0c23ab..0abebf2c654 100644 --- a/ui/litellm-dashboard/out/onboarding.html +++ b/ui/litellm-dashboard/out/onboarding.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/onboarding.txt b/ui/litellm-dashboard/out/onboarding.txt index da1246ebd7e..f1696497a6e 100644 --- a/ui/litellm-dashboard/out/onboarding.txt +++ b/ui/litellm-dashboard/out/onboarding.txt @@ -3,6 +3,6 @@ 4:I[4707,[],""] 5:I[36423,[],""] 6:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"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":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L6",null,{"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],["$L7",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"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":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L6",null,{"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],["$L7",null]]]] 7:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/organizations.html b/ui/litellm-dashboard/out/organizations.html index dd74b79e07d..341418449dc 100644 --- a/ui/litellm-dashboard/out/organizations.html +++ b/ui/litellm-dashboard/out/organizations.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/organizations.txt b/ui/litellm-dashboard/out/organizations.txt index 6105f1f16bf..cf40b6ca6fe 100644 --- a/ui/litellm-dashboard/out/organizations.txt +++ b/ui/litellm-dashboard/out/organizations.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[57616,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-e4210f33d0c47644.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","2004","static/chunks/2004-84c2eb40e7339274.js","6459","static/chunks/app/(dashboard)/organizations/page-780c2489fe818e99.js"],"default",1] +3:I[57616,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-66e1fb73fd8f2361.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","2004","static/chunks/2004-84c2eb40e7339274.js","6459","static/chunks/app/(dashboard)/organizations/page-b3984352a81218bf.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","organizations","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["organizations",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","organizations","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/settings/admin-settings.html b/ui/litellm-dashboard/out/settings/admin-settings.html index fcf3f7070e9..b3a35889dc1 100644 --- a/ui/litellm-dashboard/out/settings/admin-settings.html +++ b/ui/litellm-dashboard/out/settings/admin-settings.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/settings/admin-settings.txt b/ui/litellm-dashboard/out/settings/admin-settings.txt index b9616a12f6b..8f92a9bd541 100644 --- a/ui/litellm-dashboard/out/settings/admin-settings.txt +++ b/ui/litellm-dashboard/out/settings/admin-settings.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[8786,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","9775","static/chunks/9775-ac7313139c5f089d.js","9678","static/chunks/9678-c633432ec1f8c65a.js","7281","static/chunks/7281-41cef56aa2b3df92.js","2052","static/chunks/2052-68db39dea49a676f.js","8049","static/chunks/8049-b89d8be2044ba775.js","773","static/chunks/773-9d5b4a4620697fa3.js","8958","static/chunks/app/(dashboard)/settings/admin-settings/page-2eb58335a1815840.js"],"default",1] +3:I[8786,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","9775","static/chunks/9775-ac7313139c5f089d.js","9678","static/chunks/9678-c633432ec1f8c65a.js","7281","static/chunks/7281-41cef56aa2b3df92.js","2052","static/chunks/2052-68db39dea49a676f.js","8049","static/chunks/8049-b89d8be2044ba775.js","773","static/chunks/773-9d5b4a4620697fa3.js","8958","static/chunks/app/(dashboard)/settings/admin-settings/page-e0b752319b5f23e3.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children","admin-settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["settings",{"children":["admin-settings",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children","admin-settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/settings/logging-and-alerts.html b/ui/litellm-dashboard/out/settings/logging-and-alerts.html index 118815d177d..242697b557d 100644 --- a/ui/litellm-dashboard/out/settings/logging-and-alerts.html +++ b/ui/litellm-dashboard/out/settings/logging-and-alerts.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/settings/logging-and-alerts.txt b/ui/litellm-dashboard/out/settings/logging-and-alerts.txt index 20f5acce4cb..89964343546 100644 --- a/ui/litellm-dashboard/out/settings/logging-and-alerts.txt +++ b/ui/litellm-dashboard/out/settings/logging-and-alerts.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[72719,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","9775","static/chunks/9775-ac7313139c5f089d.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9678","static/chunks/9678-c633432ec1f8c65a.js","226","static/chunks/226-81daaf8cff08ccfe.js","8049","static/chunks/8049-b89d8be2044ba775.js","6925","static/chunks/6925-c4d6db49a055b630.js","2445","static/chunks/app/(dashboard)/settings/logging-and-alerts/page-2dd68c688405947c.js"],"default",1] +3:I[72719,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","9775","static/chunks/9775-ac7313139c5f089d.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9678","static/chunks/9678-c633432ec1f8c65a.js","226","static/chunks/226-81daaf8cff08ccfe.js","8049","static/chunks/8049-b89d8be2044ba775.js","6925","static/chunks/6925-c4d6db49a055b630.js","2445","static/chunks/app/(dashboard)/settings/logging-and-alerts/page-e74cb0886bb1ae12.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children","logging-and-alerts","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["settings",{"children":["logging-and-alerts",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children","logging-and-alerts","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/settings/router-settings.html b/ui/litellm-dashboard/out/settings/router-settings.html index 3d8372151bf..f953fe233a5 100644 --- a/ui/litellm-dashboard/out/settings/router-settings.html +++ b/ui/litellm-dashboard/out/settings/router-settings.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/settings/router-settings.txt b/ui/litellm-dashboard/out/settings/router-settings.txt index fd5d7f383be..c2e1fa4a102 100644 --- a/ui/litellm-dashboard/out/settings/router-settings.txt +++ b/ui/litellm-dashboard/out/settings/router-settings.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[14809,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","6433","static/chunks/6433-c9b3a95c5de0b59f.js","1223","static/chunks/1223-de5e7e4f043a5233.js","524","static/chunks/524-7d2ee0bcca73edc8.js","8049","static/chunks/8049-b89d8be2044ba775.js","4289","static/chunks/4289-85d72de0c6c33d90.js","8021","static/chunks/app/(dashboard)/settings/router-settings/page-ae3eb6d2dd0a7482.js"],"default",1] +3:I[14809,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","6433","static/chunks/6433-c9b3a95c5de0b59f.js","1223","static/chunks/1223-de5e7e4f043a5233.js","524","static/chunks/524-7d2ee0bcca73edc8.js","8049","static/chunks/8049-b89d8be2044ba775.js","4289","static/chunks/4289-85d72de0c6c33d90.js","8021","static/chunks/app/(dashboard)/settings/router-settings/page-bee996411f1fcc21.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children","router-settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["settings",{"children":["router-settings",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children","router-settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/settings/ui-theme.html b/ui/litellm-dashboard/out/settings/ui-theme.html index 3d33677d0f6..31c174095fc 100644 --- a/ui/litellm-dashboard/out/settings/ui-theme.html +++ b/ui/litellm-dashboard/out/settings/ui-theme.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/settings/ui-theme.txt b/ui/litellm-dashboard/out/settings/ui-theme.txt index 68dac33dfdd..9cbe7af9cd8 100644 --- a/ui/litellm-dashboard/out/settings/ui-theme.txt +++ b/ui/litellm-dashboard/out/settings/ui-theme.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[8719,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","8049","static/chunks/8049-b89d8be2044ba775.js","3117","static/chunks/app/(dashboard)/settings/ui-theme/page-0f2f3ef3fbd6b918.js"],"default",1] +3:I[8719,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","8049","static/chunks/8049-b89d8be2044ba775.js","3117","static/chunks/app/(dashboard)/settings/ui-theme/page-0194d673a7ecabbb.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children","ui-theme","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["settings",{"children":["ui-theme",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children","ui-theme","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","settings","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/teams.html b/ui/litellm-dashboard/out/teams.html index 91b7b7a38b3..8437bb81171 100644 --- a/ui/litellm-dashboard/out/teams.html +++ b/ui/litellm-dashboard/out/teams.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/teams.txt b/ui/litellm-dashboard/out/teams.txt index 23985a989c9..723500652cf 100644 --- a/ui/litellm-dashboard/out/teams.txt +++ b/ui/litellm-dashboard/out/teams.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[67578,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9678","static/chunks/9678-c633432ec1f8c65a.js","8714","static/chunks/8714-9bfbade577ce106c.js","7281","static/chunks/7281-41cef56aa2b3df92.js","3310","static/chunks/3310-f5a0ffe4838613cc.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-e4210f33d0c47644.js","2004","static/chunks/2004-84c2eb40e7339274.js","2012","static/chunks/2012-7d504e8114e3c4be.js","9483","static/chunks/app/(dashboard)/teams/page-77a91fcf970152d7.js"],"default",1] +3:I[67578,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9678","static/chunks/9678-c633432ec1f8c65a.js","8714","static/chunks/8714-9bfbade577ce106c.js","7281","static/chunks/7281-41cef56aa2b3df92.js","3310","static/chunks/3310-f5a0ffe4838613cc.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-66e1fb73fd8f2361.js","2004","static/chunks/2004-84c2eb40e7339274.js","2012","static/chunks/2012-434800e13df9d31b.js","9483","static/chunks/app/(dashboard)/teams/page-3be10e89c819961e.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","teams","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["teams",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","teams","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/test-key.html b/ui/litellm-dashboard/out/test-key.html index 0dc353ffbfb..a8e91eaa05f 100644 --- a/ui/litellm-dashboard/out/test-key.html +++ b/ui/litellm-dashboard/out/test-key.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/test-key.txt b/ui/litellm-dashboard/out/test-key.txt index a73346379c1..f3890f6cf05 100644 --- a/ui/litellm-dashboard/out/test-key.txt +++ b/ui/litellm-dashboard/out/test-key.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[38511,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","7906","static/chunks/7906-11071e9e2e7b8318.js","4851","static/chunks/4851-fbdd7aec2937c09d.js","6433","static/chunks/6433-c9b3a95c5de0b59f.js","9888","static/chunks/9888-342228cf692a5e88.js","8049","static/chunks/8049-b89d8be2044ba775.js","3240","static/chunks/3240-82b4f5f7b08d1cf1.js","2322","static/chunks/app/(dashboard)/test-key/page-d460fe80920627a2.js"],"default",1] +3:I[38511,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","7906","static/chunks/7906-11071e9e2e7b8318.js","4851","static/chunks/4851-fbdd7aec2937c09d.js","6433","static/chunks/6433-c9b3a95c5de0b59f.js","9888","static/chunks/9888-342228cf692a5e88.js","8049","static/chunks/8049-b89d8be2044ba775.js","3240","static/chunks/3240-82b4f5f7b08d1cf1.js","2322","static/chunks/app/(dashboard)/test-key/page-07801bcd0ac75c02.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","test-key","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["test-key",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","test-key","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/tools/mcp-servers.html b/ui/litellm-dashboard/out/tools/mcp-servers.html index 3c089c549a1..487ef6576dd 100644 --- a/ui/litellm-dashboard/out/tools/mcp-servers.html +++ b/ui/litellm-dashboard/out/tools/mcp-servers.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/tools/mcp-servers.txt b/ui/litellm-dashboard/out/tools/mcp-servers.txt index a6d44d61722..dd20a286d6e 100644 --- a/ui/litellm-dashboard/out/tools/mcp-servers.txt +++ b/ui/litellm-dashboard/out/tools/mcp-servers.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[45045,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","352","static/chunks/352-522118f2414c0053.js","1264","static/chunks/1264-2979d95e0b56a75c.js","4851","static/chunks/4851-fbdd7aec2937c09d.js","5030","static/chunks/5030-d46e46be47c1567d.js","4642","static/chunks/4642-946127f3f7045397.js","8049","static/chunks/8049-b89d8be2044ba775.js","4138","static/chunks/4138-21d3fafa4fdcc45f.js","6940","static/chunks/app/(dashboard)/tools/mcp-servers/page-3fbfc3ba4ccd0398.js"],"default",1] +3:I[45045,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","352","static/chunks/352-57ffb92bf8445776.js","1264","static/chunks/1264-2979d95e0b56a75c.js","4851","static/chunks/4851-fbdd7aec2937c09d.js","5030","static/chunks/5030-d46e46be47c1567d.js","4642","static/chunks/4642-946127f3f7045397.js","8049","static/chunks/8049-b89d8be2044ba775.js","4138","static/chunks/4138-21d3fafa4fdcc45f.js","6940","static/chunks/app/(dashboard)/tools/mcp-servers/page-ec7a6ad1cdc85e11.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","tools","children","mcp-servers","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","tools","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["tools",{"children":["mcp-servers",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","tools","children","mcp-servers","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","tools","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/tools/vector-stores.html b/ui/litellm-dashboard/out/tools/vector-stores.html index b963bd8f6d6..9c479906f21 100644 --- a/ui/litellm-dashboard/out/tools/vector-stores.html +++ b/ui/litellm-dashboard/out/tools/vector-stores.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/tools/vector-stores.txt b/ui/litellm-dashboard/out/tools/vector-stores.txt index a57706a1510..aa2484f555a 100644 --- a/ui/litellm-dashboard/out/tools/vector-stores.txt +++ b/ui/litellm-dashboard/out/tools/vector-stores.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[77438,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","7908","static/chunks/7908-07a76cfe29c543c9.js","352","static/chunks/352-522118f2414c0053.js","1747","static/chunks/1747-aaff7ceca7d22e16.js","8049","static/chunks/8049-b89d8be2044ba775.js","6204","static/chunks/6204-34043d3e081cf6ca.js","6248","static/chunks/app/(dashboard)/tools/vector-stores/page-e87e07b0e702176d.js"],"default",1] +3:I[77438,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","7908","static/chunks/7908-07a76cfe29c543c9.js","352","static/chunks/352-57ffb92bf8445776.js","1747","static/chunks/1747-aaff7ceca7d22e16.js","8049","static/chunks/8049-b89d8be2044ba775.js","6204","static/chunks/6204-34043d3e081cf6ca.js","6248","static/chunks/app/(dashboard)/tools/vector-stores/page-041c519b4c624669.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","tools","children","vector-stores","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","tools","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{}]}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["tools",{"children":["vector-stores",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","tools","children","vector-stores","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","tools","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/usage.html b/ui/litellm-dashboard/out/usage.html index df316caaf4b..6c5a2acd19e 100644 --- a/ui/litellm-dashboard/out/usage.html +++ b/ui/litellm-dashboard/out/usage.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/usage.txt b/ui/litellm-dashboard/out/usage.txt index 7c2cfdd8d7d..d3cd96c16b5 100644 --- a/ui/litellm-dashboard/out/usage.txt +++ b/ui/litellm-dashboard/out/usage.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[26661,["6990","static/chunks/13b76428-e1bf383848c17260.js","1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","2344","static/chunks/2344-169e12738d6439ab.js","7732","static/chunks/7732-beabba2779472f55.js","4851","static/chunks/4851-fbdd7aec2937c09d.js","1160","static/chunks/1160-3efb81c958413447.js","3250","static/chunks/3250-3256164511237d25.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-e4210f33d0c47644.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","2306","static/chunks/2306-fe439da67393cf8e.js","4746","static/chunks/app/(dashboard)/usage/page-01539529e21d2588.js"],"default",1] +3:I[26661,["6990","static/chunks/13b76428-e1bf383848c17260.js","1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","2344","static/chunks/2344-169e12738d6439ab.js","7732","static/chunks/7732-beabba2779472f55.js","4851","static/chunks/4851-fbdd7aec2937c09d.js","1160","static/chunks/1160-3efb81c958413447.js","3250","static/chunks/3250-3256164511237d25.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-66e1fb73fd8f2361.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","2306","static/chunks/2306-fe439da67393cf8e.js","4746","static/chunks/app/(dashboard)/usage/page-4108e5f8a41bca23.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","usage","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["usage",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","usage","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/users.html b/ui/litellm-dashboard/out/users.html index 57a3ce305f3..ae782945bcf 100644 --- a/ui/litellm-dashboard/out/users.html +++ b/ui/litellm-dashboard/out/users.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/users.txt b/ui/litellm-dashboard/out/users.txt index 3c43ba4f351..5677c3a7cc2 100644 --- a/ui/litellm-dashboard/out/users.txt +++ b/ui/litellm-dashboard/out/users.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[87654,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","352","static/chunks/352-522118f2414c0053.js","1264","static/chunks/1264-2979d95e0b56a75c.js","9358","static/chunks/9358-83d8d82499a7d0b5.js","8049","static/chunks/8049-b89d8be2044ba775.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","7155","static/chunks/7155-e28a3b7129eff558.js","7297","static/chunks/app/(dashboard)/users/page-7a780389649afa5e.js"],"default",1] +3:I[87654,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","352","static/chunks/352-57ffb92bf8445776.js","1264","static/chunks/1264-2979d95e0b56a75c.js","9358","static/chunks/9358-83d8d82499a7d0b5.js","8049","static/chunks/8049-b89d8be2044ba775.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","7155","static/chunks/7155-e28a3b7129eff558.js","7297","static/chunks/app/(dashboard)/users/page-bcba24bd5748f0af.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","users","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["users",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","users","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null diff --git a/ui/litellm-dashboard/out/virtual-keys.html b/ui/litellm-dashboard/out/virtual-keys.html index d7d8b084ee8..8db2aa1f66f 100644 --- a/ui/litellm-dashboard/out/virtual-keys.html +++ b/ui/litellm-dashboard/out/virtual-keys.html @@ -1 +1 @@ -LiteLLM Dashboard \ No newline at end of file +LiteLLM Dashboard \ No newline at end of file diff --git a/ui/litellm-dashboard/out/virtual-keys.txt b/ui/litellm-dashboard/out/virtual-keys.txt index 18f7b5fb94f..dace8f82307 100644 --- a/ui/litellm-dashboard/out/virtual-keys.txt +++ b/ui/litellm-dashboard/out/virtual-keys.txt @@ -1,14 +1,14 @@ 2:I[19107,[],"ClientPageRoot"] -3:I[2425,["3665","static/chunks/3014691f-702e24806fe9cec4.js","1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-e0933e3af843b646.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","1264","static/chunks/1264-2979d95e0b56a75c.js","1791","static/chunks/1791-a6d39a6d2828de66.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-e4210f33d0c47644.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","1739","static/chunks/1739-c0af4725a2b1d546.js","7049","static/chunks/app/(dashboard)/virtual-keys/page-61334fac893de776.js"],"default",1] +3:I[2425,["3665","static/chunks/3014691f-702e24806fe9cec4.js","1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","2417","static/chunks/2417-b28f330f82bf4a82.js","2926","static/chunks/2926-b5dcad9f62f5e2b1.js","3709","static/chunks/3709-b17db86e0ab325d2.js","9775","static/chunks/9775-ac7313139c5f089d.js","2525","static/chunks/2525-13b137f40949dcf1.js","1529","static/chunks/1529-130888c02463f3dd.js","2284","static/chunks/2284-4cbc9a7f33eb7c89.js","7908","static/chunks/7908-07a76cfe29c543c9.js","9011","static/chunks/9011-0769cb78a6e5f233.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9678","static/chunks/9678-c633432ec1f8c65a.js","5319","static/chunks/5319-43bd4ee5bb7e50d1.js","2945","static/chunks/2945-00442a283770ee5d.js","8714","static/chunks/8714-9bfbade577ce106c.js","8591","static/chunks/8591-7950a8541d640de3.js","7281","static/chunks/7281-41cef56aa2b3df92.js","5188","static/chunks/5188-0e9d5e6db19ac9e6.js","1264","static/chunks/1264-2979d95e0b56a75c.js","1791","static/chunks/1791-a6d39a6d2828de66.js","8049","static/chunks/8049-b89d8be2044ba775.js","131","static/chunks/131-66e1fb73fd8f2361.js","2202","static/chunks/2202-ada1ea4eee6f9c73.js","874","static/chunks/874-e11bf6df41972648.js","4292","static/chunks/4292-d5ef8eba8a84757f.js","1739","static/chunks/1739-c0af4725a2b1d546.js","7049","static/chunks/app/(dashboard)/virtual-keys/page-acc69883d650bb88.js"],"default",1] 4:I[4707,[],""] 5:I[36423,[],""] -6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-e0933e3af843b646.js","3603","static/chunks/3603-b101c17ea3d68f19.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-a79eaea2d4551c33.js"],"default",1] +6:I[89219,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","4556","static/chunks/4556-6a2e7184dcc130ca.js","3709","static/chunks/3709-b17db86e0ab325d2.js","1529","static/chunks/1529-130888c02463f3dd.js","3603","static/chunks/3603-dd19ac8e31e4bc25.js","9165","static/chunks/9165-2a738a73d0d5f1d1.js","8098","static/chunks/8098-3da3212991542668.js","8049","static/chunks/8049-b89d8be2044ba775.js","2019","static/chunks/2019-ecc3e3a4de376109.js","5642","static/chunks/app/(dashboard)/layout-47bfa1ebf47e8c30.js"],"default",1] 8:I[31857,["1114","static/chunks/1114-744a38eea84cb2ab.js","1491","static/chunks/1491-8280340b5391aa11.js","8049","static/chunks/8049-b89d8be2044ba775.js","3185","static/chunks/app/layout-0bc41a5c7b3d1a81.js"],"FeatureFlagsProvider"] 7:{} 9:{"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"} a:{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"} b:{"display":"inline-block"} c:{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0} -0:["7uAAvsXigIy3uk94_sJZ2",[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","virtual-keys","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] +0:["ptN6qp8sxM2Fo-qRqYi8s",[[["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["(dashboard)",{"children":["virtual-keys",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","children","virtual-keys","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[null,["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","(dashboard)","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":[]}],"params":"$7"}]],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/349654da14372cd9.css","precedence":"next","crossOrigin":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/css/40feb962788c268d.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_1c856b","children":["$","$L8",null,{"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":"$9","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":"$a","children":"404"}],["$","div",null,{"style":"$b","children":["$","h2",null,{"style":"$c","children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$Ld",null]]]] d:[["$","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":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","link","5",{"rel":"icon","href":"./favicon.ico"}],["$","meta","6",{"name":"next-size-adjust"}]] 1:null